Class

Array

  The Array class is an array with integer indexes and a length property.

QuickLinks

Array, concat, join, pop, push, reverse, shift, slice, sort, splice, toLocaleString, toSource, toString, unshift

Properties

PropertyTypeAccessDescription
lengthnumberr/wThe length of the array

Methods

Array Array (length:number)
Creates and returns a new array.

ParameterTypeDescription
lengthnumber

Array concat (value:any)
Returns a new array created by concatenating the given values to the end of the original array.

ParameterTypeDescription
value any Any number of values to be added to the end of the array.

string join (delimiter:string)
Joins all elements of the array into a string; optionally, each element is separated by delimiter.

ParameterTypeDescription
delimiterstringA string used to separate each element of the array.

any pop ()
Removes the last element from the array, decreases the length by 1, and returns the value of the element.

number push (value:number)
Places one or more values onto the end of the array and increases length by n.

ParameterTypeDescription
valuenumberAny number of values to be pushed onto the end of the array.

Array reverse ()
Reverses the order of the elements in the array.

any shift ()
Removes the first element from the array, decreases the length by 1, and returns the value of the element.

Array slice ()
Creates a new array, which contains a subset of the original array's elements.

void sort (userFunction:Function)
Sorts the elements of the array in place, using the given function to compare to elements.

ParameterTypeDescription
userFunctionFunctionA user-supplied function of the form userFunction(a, b) which returns less than 0 if a is greater than b, 0 if a and b are equal, and greater than 0 if b is greater than a.

Array splice (start:number, num:number, value:any)
Removes num elements from the array beginning with index, start.

ParameterTypeDescription
startnumberThe index of the first element to remove. Negative values are relative to the end of the array.
numnumberThe number of array elements to remove, including start. If omitted, all elements from array index start to the end of the array are removed.
value any A list of one or more values to be added to the array starting at index start.

string toLocaleString ()
Converts an array to a string and returns the string (localized).

string toSource ()
Creates a string representation of this object that can be fed back to eval() to re-create an object. Works only with built-in classes.

string toString ()
Converts an array to a string and returns the string.

number unshift (value:any)
Adds one or more elements to the beginning of the array.

ParameterTypeDescription
value any The values of one or more elements to be added to the beginning of the array.

Used in

Function.apply (thisObj:Object, args:Array)

Return

Array Array.Array (length:number)

Array Array.concat (value:any)

Array Array.reverse ()

Array Array.slice ()

Array Array.splice (start:number, num:number, value:any)

Array Folder.getFiles (mask:any)

Array RegExp.exec (text:string)

Array String.match (regexp:RegExp)

Array XML.inScopeNamespaces ()

Array XML.namespaceDeclarations ()

Contents :: Index