You are reading a single comment by @rwaldron and its replies. Click here to read the full conversation.
  • 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".

    This is correct:

    for (var i in ["a","b","c"]) console.log(i)
    0
    1
    2
    
About

Avatar for rwaldron @rwaldron started