If I create the following constant in the browser console:
const myArray = Array(2);
This outputs the following:
(2) [empty × 2]
And when I use the spread operator in the following manner:
const myUndefinedArray = [...myArray]
Then the console returns:
(2) [undefined, undefined]
In both cases it says the length is two. What are the use cases for each of these options? Is there any specific implication to "empty"?