In Chrome Version 125.0.6422.76 (Official Build) (64-bit), I'm seeing this weird behavior with the Array constructor:
Notice that a's length is correctly stored as 3 internally.
I care less if Javascript is doing an internal optimization by lazily allocating the 3 (or more) elements later (say, during element assignment) as long as an array of length 3 is returned as an object for the map call in a.map().
Apparently, it isn't, since no foo's get printed as they do with b.map().
![Javascript: Array(3).map() vs [...Array(3)].map() weird behavior](https://www.lemona.fr/i.sstatic.net/6HSUS2gB.png)
.map()skips over empty element, and spread syntax replace the empty element with undefined