Name

unshift() — NN 4 IE n/a ECMA n/a

Synopsis

unshift(value)

Inserts an item at the beginning of an array. The length of the array increases by one, and the method returns the new length of the array.

Returned Value

Integer.

Parameters

value

Any JavaScript value.

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.