Probably noob JS question, but when we try to do this
new Array(5).map((_, index) => index);
we could expect to get something like 0,1,2,3,4 but we get an array of 5 empty elements. Why is that?
Probably noob JS question, but when we try to do this
new Array(5).map((_, index) => index);
we could expect to get something like 0,1,2,3,4 but we get an array of 5 empty elements. Why is that?