Share via


push Method (JScript 5.6) 

Appends new elements to an array, and returns the new length of the array.


arrayObj.push([item1 [item2 [. . . [itemN ]]]])

Arguments

  • arrayObj
    Required. An Array object.
  • item, item2,. . ., itemN
    Optional. New elements of the Array.

Remarks

The push method appends elements in the order in which they appear. If one of the arguments is an array, it is added as a single element. Use the concat method to join the elements from two or more arrays.

Requirements

Version 5.5

Applies To: Array Object (JScript 5.6)

See Also

Reference

concat Method (Array) (JScript 5.6)
pop Method (JScript 5.6)