Consider these two lines of code:
>> Array(3)
Array(3) [ <3 empty slots> ]
>> [...Array(3)]
Array(3) [ undefined, undefined, undefined ]
- What does the Array constructor return that makes it fundamentally different from the second result?
- What does it mean for an array to have "empty slots"? Can that be achieved through "normal" means in JS?
- What does it mean to spread an array of empty slots, and why does it change when converted back into an array this way?