You're half-way right!
I think that maybe since each item in the array is undefined, it doesn't even execute the forEach.
Array.prototype.forEach does not visit indices which have been deleted or elided; this is a process called ellision. So, it executes, but skips over every element.
From MDN:
