Perbedaan antara shift dan unshift dalam javascript

// Shift (remove) the first element of the array:
const fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.shift(); //Orange,Apple,Mango

// Add new elements to an array:
const fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.unshift("Lemon","Pineapple"); //Lemon,Pineapple,Banana,Orange,Apple,Mango

Tiny Coders