/ Published in: JavaScript
Use this function to test whether or not a Javascript object is empty.
Expand |
Embed | Plain Text
function isEmpty(obj) { for(var prop in obj) { if(obj.hasOwnProperty(prop)) return false; } return true; }
You need to login to post a comment.
