Why this:
[undefined, undefined].map(function(i) { console.log(i); })
produces the expected output (2 times undefined
), but this:
(new Array(2)).map(function(i) { console.log(i); })
doesn't?
Why this:
[undefined, undefined].map(function(i) { console.log(i); })
produces the expected output (2 times undefined
), but this:
(new Array(2)).map(function(i) { console.log(i); })
doesn't?