Regarding:
for (var i in ["a","b","c"]) console.log(i) "a" "b" "c"
This is incorrect. for-in will assign the value of the "key" (in this case the numeric index) to i, not the property "value".
i
This is correct:
for (var i in ["a","b","c"]) console.log(i) 0 1 2
@rwaldron started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Regarding:
This is incorrect. for-in will assign the value of the "key" (in this case the numeric index) to
i
, not the property "value".This is correct: