I assumed these would be equal:
new Array(1).fill(0); // [0]
new Array(1).map(x => 0); // [undefined]
Why doesn't map
work in the second case?
I assumed these would be equal:
new Array(1).fill(0); // [0]
new Array(1).map(x => 0); // [undefined]
Why doesn't map
work in the second case?