Why is the behavior different for javascript arrays created with new?
(new Array(10)).length
10
var x = 0;
(new Array(10)).forEach(function(){ console.log(++x) });
: nothing - Why?
var x = 0;
[undefined,undefined,undefined].forEach( function(){console.log(++x)});
1
2
3