Array object

Represents indexed vector (array) of values.

Properties
length - integer, number of items in the array. Read/write property.
[index] - value, element of the array at the index position, Read-write index accessor. Zero-based index.
[begin..end] - integers, zero-based indexes of first and last element of the range. Returns slice of vector contains elements from start index and up to but not included end index. Begin or/and end are optional. If begin is ommited then it is assumed to be 0, if end - length is used as an end value.
Methods
Array
([value1 [, value2 [, ... valueN ]]])

Creates new array object from arguments provided. Use as
var a = new Array(...);

toLocaleString
() returns: string

Returns string - comma separated list of values

toString
() returns: string

Returns string - comma separated list of values

valueOf
() returns: string

Same as toString.

clone
() returns: array

Returns brand new copy of the array.

push
([value1 [, value2 [, ... valueN ]]]) returns: value

Appends array by values. Returns last inserted element.

shift
() returns: value | undefined

Removes first element of the array. Returns removed element.

pop
() returns: value | undefined

Removes last element of the array. Returns removed element.

unshift
(value) returns: value | undefined

Inserts value at first array position. Returns the value.

concat
([value1 [, value2 [, ... valueN ]]]) returns: array

Appends array by values. Returns the array.

join
([delimeter]) returns: string

Returns string with all elements of the array separated by the delimeter or comma

reverse
() returns: array

Reverses order of elements in the array in-place. Returns the array.

slice
(start[, end]) returns: array | undefined

Returns new array consisting from elements of the array from start up to but not including end index.

splice
(start[, end]) returns: array | undefined

Moves range of elements from start to end (not including) from the array into new array and returns this new array.

sort
( [compareFunction] ) returns: array

Sorts elements of the array in ascending order. If the compareFunction provided it is used for comparing elements during sort.  compareFunction shall accept two values in parameters and return -1, 0 or +1 as a result.