Chapter 7. Arrays
and in most other programming languages.
An array is an ordered collection of values. Each value is called an
element, and each element has a numeric position in the array, known as its
and different elements of the same array may be of different types. Array
elements may even be objects or other arrays, which allows you to create
complex data structures, such as arrays of objects and arrays of arrays.
first element is 0, and the highest possible index is 4294967294 (232−2), for
dynamic: they grow or shrink as needed, and there is no need to declare a
fixed size for the array when you create it or to reallocate it when the size
property. For nonsparse arrays, this property specifies the number of elements
in the array. For sparse arrays,
length is larger than the highest
index of any element.