Actually in JS array indexing is same as property indexing right? So it's actually looking up the string '0', as in arr['0']
Huh. I always thought that JS objects supported string and number keys separately, like lua. Nope!
[Documents]$ cat test.js let testArray = []; testArray[0] = "foo"; testArray["0"] = "bar"; console.log(testArray[0]); console.log(testArray["0"]); [Documents]$ jsc test.js bar bar [Documents]$
Huh. I always thought that JS objects supported string and number keys separately, like lua. Nope!