Is there a way to get (from somewhere) the number of elements in a javascript object?? (i.e. constant-time complexity).
I cant find a property or method that retriev
function count(){ var c= 0; for(var p in this) if(this.hasOwnProperty(p))++c; return c; } var O={a: 1, b: 2, c: 3}; count.call(O);