JScript  

unshift Method

Returns an array with specified elements inserted at the beginning.

arrayObj.unshift([item1[, item2 [, . . . [, itemN]]]])

Arguments

arrayObj
Required. An Array object.
item1, item2,. . ., itemN
Optional. Elements to insert at the start of the Array.

Remarks

The unshift method inserts elements into the start of an array, so they appear in the same order in which they appear in the argument list.

Requirements

Version 5.5

See Also

shift Method

Applies To: Array Object