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
I'd just like to point out that you can now do:
Array(2).fill().map(_ => 4);
This will return [4, 4].
[4, 4]