unshift method in arrays is used insert an element in the beginning of the array.
//Name of the file : array-unshift.js
arr = [ 5 , 5 , 8 , 7 , 6 ];
console.log(arr);
arr.unshift(1);
console.log(arr);
>node array-unshift.js
[ 5, 5, 8, 7, 6 ]
[ 1, 5, 5, 8, 7, 6 ]