array.unshift(element1, element2, ..., elementX)
Example: Below is the example of the Array unshift() method.
arr.push(element1, elements2 ....., elementN]])
Example: Below is the example of the Array push() method.
|This method adds an elements to the beginning of the array.||This method adds elements to the end of the array.|
|This method shifts the index of the first element by 1.||This method adds a new index at the last of the array.|
Please Login to comment...