Array.map() does not invoke the callback for indexes whose values aren't defined.
From MDN docs:
map calls a provided callback function once for each element in an
array, in order, and constructs a new array from the results. callback
is invoked only for indexes of the array which have assigned values;
it is not invoked for indexes that are undefined, those which have
been deleted or which have never been assigned values.