TopLevel
Class Array
Object
Array
An Array of items.
Properties
length  :  Number
The length of the Array.
Constructor Summary
Array()
Constructs an Array.
Array(length : Number)
Constructs an Array of the specified length.
Array(values : Object...)
Constructs an Array using the specified values.
Method Summary
concat(values : Object...) : Array
Constructs an Array by concatenating multiple values.
every(callback : Function) : boolean
Returns true if every element in this array satisfies the test performed in the callback function.
every(callback : Function, thisObject : Array) : boolean
Returns true if every element in the thisObject argument satisfies the test performed in the callback function, false otherwise.
filter(callback : Function) : Array
Returns a new Array with all of the elements that pass the test implemented by the callback function.
filter(callback : Function, thisObject : Array) : Array
Returns a new Array with all of the elements that pass the test implemented by the callback function that is run against the specified Array, thisObject.
forEach(callback : Function) : void
Runs the provided callback function once for each element present in the Array.
forEach(callback : Function, thisObject : Array) : void
Runs the provided callback function once for each element present in the specified Array, thisObject.
indexOf(elementToLocate : Object) : Number
Returns the first index at which a given element can be found in the array, or -1 if it is not present.
indexOf(elementToLocate : Object, fromIndex : Number) : Number
Returns the first index at which a given element can be found in the array starting at fromIndex, or -1 if it is not present.
join() : String
Converts all Array elements to Strings and concatenates them.
join(separator : String) : String
Converts all array elements to Strings and concatenates them.
lastIndexOf(elementToLocate : Object) : Number
Returns the last index at which a given element can be found in the array, or -1 if it is not present.
lastIndexOf(elementToLocate : Object, fromIndex : Number) : Number
Returns the last index at which a given element can be found in the array starting at fromIndex, or -1 if it is not present.
map(callback : Function) : Array
Creates a new Array with the results of calling the specified function on every element in this Array.
map(callback : Function, thisObject : Array) : Array
Creates a new Array with the results of calling the specified function on every element in the specified Array.
pop() : Object
Removes and returns the last element of the Array.
push(values : Object...) : Number
Appends elements to the Array.
reverse() : void
Reverses the order of the elements in the Array.
shift() : Object
Shifts elements down in the Array and returns the former first element.
slice(start : Number, end : Number) : Array
Returns a new Array containing a portion of the Array using the specified start and end positions.
some(callback : Function) : boolean
Returns true if any of the elements in the Array pass the test defined in the callback function, false otherwise.
some(callback : Function, thisObject : Array) : boolean
Returns true if any of the elements in the specified Array pass the test defined in the callback function, false otherwise.
sort() : Array
Sorts the elements of the Array in alphabetical order based on character encoding.
sort(function : Function) : Array
Sorts the elements of the Array in alphabetical order based on character encoding.
splice(start : Number, deleteCount : Number, values : Object...) : Array
Deletes the specified number of elements from the Array at the specified position, and then inserts values into the Array at that location.
toLocaleString() : String
Converts the Array to a localized String.
toString() : String
Converts the Array to a String.
unshift(values : Object...) : Number
Inserts elements at the beginning of the Array.
Methods inherited from class Object
Constructor Detail
Array
public Array()
Constructs an Array.

Array
public Array(length : Number)
Constructs an Array of the specified length.
Parameters:
length - the length of the Array.

Array
public Array(values : Object...)
Constructs an Array using the specified values.
Parameters:
values - zero or more values that are stored in the Array.

Method Detail
concat
concat(values : Object...) : Array
Constructs an Array by concatenating multiple values.
Parameters:
values - one or more Array values.
Returns:
a new Array containing the concatenated values.

every
every(callback : Function) : boolean
Returns true if every element in this array satisfies the test performed in the callback function. The callback function is invoked with three arguments: the value of the element, the index of the element, and the Array object being traversed.
Parameters:
callback - the function to call to determine if every element in this array satisfies the test defined by the function. The callback function is invoked with three arguments: the value of the element, the index of the element, and the Array object being traversed.
Returns:
true if every element in this array satisfies the test performed in the callback function.
See Also:

every
every(callback : Function, thisObject : Array) : boolean
Returns true if every element in the thisObject argument satisfies the test performed in the callback function, false otherwise. The callback function is invoked with three arguments: the value of the element, the index of the element, and the Array object being traversed.
Parameters:
callback - the function to call to determine if every element in this array satisfies the test defined by the function. The callback function is invoked with three arguments: the value of the element, the index of the element, and the Array object being traversed.
thisObject - the Object to use as 'this' when executing callback.
Returns:
true if every element in thisObject satisfies the test performed in the callback function, false otherwise.
See Also:

filter
filter(callback : Function) : Array
Returns a new Array with all of the elements that pass the test implemented by the callback function. The callback function is invoked with three arguments: the value of the element, the index of the element, and the Array object being traversed.
Parameters:
callback - the function that is called on this Array and which returns a new Array containing the elements that satisfy the function's test. The callback function is invoked with three arguments: the value of the element, the index of the element, and the Array object being traversed.
Returns:
a new Array containing the elements that satisfy the function's test.

filter
filter(callback : Function, thisObject : Array) : Array
Returns a new Array with all of the elements that pass the test implemented by the callback function that is run against the specified Array, thisObject. The callback function is invoked with three arguments: the value of the element, the index of the element, and the Array object being traversed.
Parameters:
callback - the function that is called on the thisObject Array and which returns a new Array containing the elements that satisfy the function's test. The callback function is invoked with three arguments: the value of the element, the index of the element, and the Array object being traversed.
thisObject - the Object to use as 'this' when executing callback.
Returns:
a new Array containing the elements that satisfy the function's test.

forEach
forEach(callback : Function) : void
Runs the provided callback function once for each element present in the Array. The callback function is invoked only for indexes of the Array which have assigned values; it is not invoked for indexes which have been deleted or which have never been assigned a value.
Parameters:
callback - the function to call, which is invoked with three arguments: the value of the element, the index of the element, and the Array object being traversed.

forEach
forEach(callback : Function, thisObject : Array) : void
Runs the provided callback function once for each element present in the specified Array, thisObject. The callback function is invoked only for indexes of the Array which have assigned values; it is not invoked for indexes which have been deleted or which have never been assigned a value.
Parameters:
callback - the function to call, which is invoked with three arguments: the value of the element, the index of the element, and the Array object being traversed.
thisObject - the Object to use as 'this' when executing callback.

indexOf
indexOf(elementToLocate : Object) : Number
Returns the first index at which a given element can be found in the array, or -1 if it is not present.
Parameters:
elementToLocate - the element to locate in the Array.
Returns:
the index of the element or -1 if it is no preset.

indexOf
indexOf(elementToLocate : Object, fromIndex : Number) : Number
Returns the first index at which a given element can be found in the array starting at fromIndex, or -1 if it is not present.
Parameters:
elementToLocate - the element to locate in the Array.
fromIndex - the index from which to start looking for the element.
Returns:
the index of the element or -1 if it is no preset.

join
join() : String
Converts all Array elements to Strings and concatenates them.
Returns:
a concatenated list of all Array elements as a String.

join
join(separator : String) : String
Converts all array elements to Strings and concatenates them.
Parameters:
separator - an optional character or string used to separate one element of the Array from the next element in the return String.
Returns:
a concatenated list of all Array elements as a String where the specified delimiter is used to separate elements.

lastIndexOf
lastIndexOf(elementToLocate : Object) : Number
Returns the last index at which a given element can be found in the array, or -1 if it is not present. The array is searched backwards.
Parameters:
elementToLocate - the element to locate in the Array.
Returns:
the index of the element or -1 if it is no preset.

lastIndexOf
lastIndexOf(elementToLocate : Object, fromIndex : Number) : Number
Returns the last index at which a given element can be found in the array starting at fromIndex, or -1 if it is not present. The array is searched backwards.
Parameters:
elementToLocate - the element to locate in the Array.
fromIndex - the index from which to start looking for the element. The array is searched backwards.
Returns:
the index of the element or -1 if it is no present.

map
map(callback : Function) : Array
Creates a new Array with the results of calling the specified function on every element in this Array. The callback function is invoked only for indexes of the Array which have assigned values; it is not invoked for indexes which have been deleted or which have never been assigned values.
Parameters:
callback - the function to call, which is invoked with three arguments: the value of the element, the index of the element, and the Array object being traversed.
Returns:
a new Array with the results of calling the specified function on every element in this Array.

map
map(callback : Function, thisObject : Array) : Array
Creates a new Array with the results of calling the specified function on every element in the specified Array. The callback function is invoked only for indexes of the Array which have assigned values; it is not invoked for indexes which have been deleted or which have never been assigned values.
Parameters:
callback - the function to call, which is invoked with three arguments: the value of the element, the index of the element, and the Array object being traversed.
thisObject - the Object to use as 'this' when executing callback.
Returns:
a new Array with the results of calling the specified function on every element in this Array.

pop
pop() : Object
Removes and returns the last element of the Array.
Returns:
the last element of the Array.

push
push(values : Object...) : Number
Appends elements to the Array.
Parameters:
values - one or more values that will be appended to the Array.
Returns:
the new length of the Array.

reverse
reverse() : void
Reverses the order of the elements in the Array.

shift
shift() : Object
Shifts elements down in the Array and returns the former first element.
Returns:
the former first element.

slice
slice(start : Number, end : Number) : Array
Returns a new Array containing a portion of the Array using the specified start and end positions.
Parameters:
start - the location in the Array to start the slice operation.
end - the location in the Array to stop the slice operation.
Returns:
a new Array containing the members bound by start and end.

some
some(callback : Function) : boolean
Returns true if any of the elements in the Array pass the test defined in the callback function, false otherwise.
Parameters:
callback - the function to call, which is invoked with three arguments: the value of the element, the index of the element, and the Array object being traversed.
Returns:
true if any of the elements in the Array pass the test defined in the callback function, false otherwise.

some
some(callback : Function, thisObject : Array) : boolean
Returns true if any of the elements in the specified Array pass the test defined in the callback function, false otherwise.
Parameters:
callback - the function to call, which is invoked with three arguments: the value of the element, the index of the element, and the Array object being traversed.
thisObject - the Object to use as 'this' when executing callback.
Returns:
true if any of the elements in the Array pass the test defined in the callback function, false otherwise.

sort
sort() : Array
Sorts the elements of the Array in alphabetical order based on character encoding.

This sort is not guaranteed to be stable: equal elements might be reordered as a result of the sort.

Returns:
a reference to the Array.

sort
sort(function : Function) : Array
Sorts the elements of the Array in alphabetical order based on character encoding.

This sort is not guaranteed to be stable: equal elements might be reordered as a result of the sort.

Parameters:
function - a Function used to specify the sorting order.
Returns:
a reference to the Array.
See Also:

splice
splice(start : Number, deleteCount : Number, values : Object...) : Array
Deletes the specified number of elements from the Array at the specified position, and then inserts values into the Array at that location.
Parameters:
start - the start location.
deleteCount - the number of items to delete.
values - zero or more values to be inserted into the Array.

toLocaleString
toLocaleString() : String
Converts the Array to a localized String.
Returns:
a localized String representing the Array.

toString
toString() : String
Converts the Array to a String.
Returns:
a String representation of the Array.

unshift
unshift(values : Object...) : Number
Inserts elements at the beginning of the Array.
Parameters:
values - one or more vales that will be inserted into the beginning of the Array.
Returns:
the new length of the Array.