Javascript UnShift() Function

The unshift() function of array object adds one or more elements to the front of an array and returns the new length of the array. Use it for example to add one or more elements begining of array.

Syntax

Javascript UnShift() Function Example

This will produce following result