When using Chrome Version 125.0.6422.76 (Official Build) (64-bit), I have encountered a strange issue with the Array constructor.
https://i.sstatic.net/6HSUS2gB.png
It seems that the length of array 'a' is correctly stored as '3' internally.
I am not overly concerned if Javascript is optimizing by allocating the elements lazily, as long as a length 3 array is returned for the map call in a.map().
However, it appears that this is not the case, as no 'foo' elements are printed as with b.map().