Unshift method: Array class
Syntax
Unshift(paramlist)
Where paramlist is an arbitrary-length list of values in the form:
value1 [, value2] ...
Description
The Unshift method adds the given elements to the start of the array. Any following elements are moved up to indexes that are larger by the number of values moved. Flattening and Promotion are used to change the dimension of the supplied parameters to be one less than that of the given array.
Parameters
| Parameter | Description |
|---|---|
|
paramlist |
Specifies values to be added to the start of the array. |
Returns
None.
Example
The following code changes &A to be ("x", "Y", "a", "B", "c").
&A = CreateArray("a", "B", "c");
&A.Unshift("x", "Y");