It will iterate just fine, there are no values (undefined) for each `0` through `length-1`
new Array(26).length === 26; //trueSeems like it doesn't, I recently read about this gotcha so I tested it out in JSBin. Using lodash map works as expected, though.
JSBin: http://jsbin.com/vasulumeti/1/edit?js,console
StackOverflow: http://stackoverflow.com/a/5501711/211291
Actually this code is very stupid and you're half correct. The standard built in Array methods like map or forEach don't work on implicitly defined undefined values but on explicit one they do.
For example: [1,2,3,undefined].forEach(ele => console.log(ele)) > 1 > 2 > 3 > undefined On the other hand: [1,2,3,,].forEach(ele => console.log(ele)) > 1 > 2 > 3
So, take the time you dedicate to hating JavaScript to understand the language instead of bitching here you and that stupid jerk above.
Someone will probably chime in here with a correction, but the point is this -- JS is NOT a friendly language to deal with.