Core JavaScriptExtendScript only
Object

Array

An array with integer indexing and a length property.

Properties

NameType AccessDescription
Number read/write The length of the array

Methods

Array

Creates and returns a new array.

length Number If no other parameters are passed, the initial length of the empty array.
element? Varies If there is more than one parameter, the array is initialized with the given parameters.
Array

Returns a new array created by concatenating the given values to the end of the original array.

value Varies Any number of values to be added to the end of the array.
String

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

delimiter? String A string used to separate each element of the array.
→ Varies

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

Number

Places one or more values onto the end of the array and increases length by n.

value Number Any number of values to be pushed onto the end of the array.
Array

Reverses the order of the elements in the array.

→ Varies

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

Array

Creates a new array, which contains a subset of the original array's elements.

void

Sorts the elements of the array in place, using the given function to compare to elements.

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

Removes num elements from the array beginning with index, start.

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? Varies A list of one or more values to be added to the array starting at index start.
String

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

String

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

Converts an array to a string and returns the string.

Number

Adds one or more elements to the beginning of the array.

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

Parameter of 1

Method parameters that accept a Array.

Return 10

Methods that return a Array.