Dense array (JavaScript)

In JavaScript, a dense array, sometimes also referred to as a packed array, is an array that has elements at contiguous positions.

More details

A dense array is internally implemented typically as an actual array, which means fast element access and as much memory consumed as the number of elements. The opposite of a dense array in JavaScript is a sparse array, which has holes in it. A sparse array is typically implemented as a hash table internally.