Search
The unshift() method is used to add a new element at the beginning of an array.
unshift()
In the example given above, vegetables.unshift("beetroot") adds a new element "beetroot" to the beginning of the array vegetables.
vegetables.unshift("beetroot")
vegetables