สามารถทำได้โดยใช้วิธี unshift ตัวอย่างเช่น
let veggies = ["Onion", "Raddish"];
veggies.unshift("Cabbage");
console.log(veggies); สิ่งนี้จะให้ผลลัพธ์
["Cabbage", "Onion", "Raddish"]
คุณยังสามารถใช้ตัวเลือกนี้เพื่อยกเลิกการเปลี่ยนหลายรายการพร้อมกันได้ เนื่องจากรองรับจำนวนตัวแปรของอาร์กิวเมนต์ ตัวอย่างเช่น −
let veggies = ["Onion", "Raddish"];
veggies.unshift("Cabbage", "Carrot", "Broccoli");
console.log(veggies); สิ่งนี้จะให้ผลลัพธ์
["Cabbage", "Carrot", "Broccoli", "Onion", "Raddish"]