Add Array Elements Method
The Add Array Elements method adds the elements that you define in the element argument to the end of the array. It adds these elements in the order that you define these arguments.
Format
arrayName.push([element1,element2, ..., elementn])
The following table describes the arguments for the Add Array Elements method.
Argument | Description |
---|---|
element1, element2, . . . elementn |
A list of elements to add to the array. |
Example
The following example includes the Add Array Elements method:
var a = new Array(1,2);
TheApplication().RaiseErrorText(a.push(5,6) + " " + a);
// Displays 4 1,2,5,6, the length and the new array.