I\'m trying to set default values on an uninitialized array using the map function but it doesn\'t seem to work, any ideas on how to set default values?
Consider thi
The .map() function skips entries that have never been assigned values. Thus on a newly-constructed array like yours, it does essentially nothing.
.map()
Here is the MDN description.