I have come across this:
var stdin = {123:1,423:1};
var stdout = Object.keys(stdin);
console.log(stdout); //["123", "423"]
console.log(typeof(stdout)); //object
console.log(stdout[0]) //123
ECMAScript® Language Specification says:
15.2.3.14 Object.keys ( O )
When the keys function is called with argument O, the following steps are taken:
... 6. Return array.
JSFIDDLE: http://jsfiddle.net/wpVvv/1/
Tested on Chrome and Firefox on Windows 7.
What is going on? Should be array, looks like array to me, is Object?
Edit:
typeof(). Arrgh.