Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Arrays are a powerful mainstay of any programming language. Unlike strings and numbers, which represent only a single value, arrays can store lists of values, even of different types. Because an array contains multiple values (or elements), they use a different syntax to add and retrieve any individual value. Whereas a variable like fullName might represent a single string, the array variable team might represent a dozen strings at once (i.e., the names of the people on the team).
An array can be created by making a new object of type Array: