Array ObjectNameArray Object---built-in support for arraysAvailabilityNavigator 3.0, Internet Explorer 3.0; arrays are available in Navigator 2.0, but the Array object class that supports them is not. Constructor
new Array() new Array(size) new Array(element0, element1, ..., elementn) Arguments
ReturnsThe newly created and initialized array. When Array() is invoked with no arguments, the returned array will have a length field of 0. Properties
Methods
DescriptionArrays are a basic syntactic feature of JavaScript. All JavaScript objects, regardless of their type, may be used as arrays. The dual nature of arrays and objects is discussed in Chapter 8, Arrays, along with full details on the JavaScript syntax for reading and setting array elements. The Array is a new object type, added in Navigator 3.0, which, along with the usual array capabilities that all JavaScript objects have, also provides additional array functionality: a constructor function for initializing arrays, an automatically updated length field that stores the size of the array, and join(), reverse(), and sort() methods that manipulate the elements of an array. See the individual reference pages for details. |
|