unshift: Adding array element in the beginning of the array.

PHOTO EMBED

Fri Sep 16 2022 13:13:18 GMT+0000 (Coordinated Universal Time)

Saved by @sreejithbs

const numbers = [1, 2, 3, 4, 5]
numbers.unshift(0) // -> add one item from the beginning
console.log(numbers) // -> [0,1,2,3,4,5]
content_copyCOPY

https://github.com/Asabeneh/30-Days-Of-JavaScript/blob/master/05_Day_Arrays/05_day_arrays.md