I have a JavaScript object like
var obj = { key1: \'value1\', key2: \'value2\', key3: \'value3\', key4: \'value4\' }
How can I
Note that in coffeescript this can be accomplished in all browsers and node as
k for k of obj
and thus
(1 for _ of obj).length