Echo JS 0.11.0

<~>
cwest893 3794 days ago. link 0 point
Get an array of an object's property names in 2 lines:
var i=0,arr=[];
for(arr[i++] in obj);

Replies

cwest893 3794 days ago. link 1 point
Thanks, yea I realize it exists but I really wrote the post to emphasize an interesting feature in JS:
for(anArray[counter++] in anObject)...

A few people already commented on my post saying that you can do this with Object.keys.  I am in no way saying you should use this over Object.keys.  In fact I updated the post to address the comments.  Sorry for the confusion.