Advertisement
Guest User

Untitled

a guest
Oct 10th, 2015
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. // get the size of associative arrays
  2. $.assocArraySize = function(obj) {
  3. var size = 0, key;
  4. for (key in obj) {
  5. if (obj.hasOwnProperty(key)) size++;
  6. }
  7. return size;
  8. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement