Array
QuickLinks
Properties
Property | Type | Access | Description |
---|---|---|---|
length | number | r/w | The length of the array |
Methods
Array Array (length:number)
Creates and returns a new array.
Parameter | Type | Description |
---|---|---|
length | number |
Array concat (value:any)
Returns a new array created by concatenating the given values to the end of the original array.
Parameter | Type | Description |
---|---|---|
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.
Parameter | Type | Description |
---|---|---|
delimiter | string | A 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.
Parameter | Type | Description |
---|---|---|
value | number | Any 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.
Parameter | Type | Description |
---|---|---|
userFunction | Function | A 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.
Parameter | Type | Description |
---|---|---|
start | number | The index of the first element to remove. Negative values are relative to the end of the array. |
num | number | The 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.
Parameter | Type | Description |
---|---|---|
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 ()