24.
What does the following code do: new Array(3)?
Throws an error due to incorrect syntax
Initializes a new array with the values [3]
Creates a new array with 3 undefined elements
Creates a new sparse array with 3 empty slots
Correct: D
The code new Array(3) creates a new sparse array with 3 empty slots. Arrays can contain "empty slots", which are not the same as slots filled with the value undefined.