Register now or log in to join your professional community.
Adds new elements to the beginning of an array, and returns the new length
Add new items to the beginning of an array
example
{
var fruits = ["Banana", "Orange", "Apple", "Mango"];fruits.unshift("Lemon","Pineapple");
}
The unshift() method adds new items to the beginning of an array, and returns the new length.
This method changes the length of an array.
To add new items at the end of an array, use the push() method.
Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.