The element to an array is usually inserted to the end of the array. Here are some ways to insert in the start index. They are:
- unshift () method – It is an inbuilt method in JavaScript which is used to insert at the beginning.
- splice () method – It is also used to add elements to an array. There are paraments in the methods. They are the position where to add the element, the number of elements to be removed and the element to be added.
- Destructuring – It allows to unpack values from arrays or properties from objects into distinct variables.
The example for each and its output is attached below:

Output
