I searched and came to this conclusion:
In JavaScript, when you define an array of a given size using "Array()" without filling it, memory is allocated for the array, but the elements within the array are left with no initial value. This means that the array has reserved memory space for a certain number of elements, but those elements are not assigned any specific value.
For example, when you code "Array(100)", JavaScript sets aside memory for possible future values, but that remains unused until you explicitly assign values to the array elements.
So every element in the array consumes memory, even if no meaningful value is assigned to it.
Also, by initializing the array with specific values, unexpected behavior is avoided when accessing or iterating over the array.
I hope my explanation has been useful.