An array groups related pieces of data in one variable. A unique number, called an index or subscript, combined with the shared variable name distinguishes each element in the array. Arrays result in shorter and simpler code in many situations because loops can deal efficiently with any number of elements by using the index number.
JScript provides two different types of arrays, JScript array objects and typed arrays. In JScript array objects, which are sparse, a script can dynamically add and remove elements, and elements can be of any data type. In typed arrays, which are dense, the size is fixed, and elements must be the same type as the base type of the array.