This can be accomplished using the unshift method. For example,
Example
let veggies = ["Onion", "Raddish"]; veggies.shift(); console.log(veggies);
Output
This will give the output −
["Raddish"]
This can be accomplished using the unshift method. For example,
let veggies = ["Onion", "Raddish"]; veggies.shift(); console.log(veggies);
This will give the output −
["Raddish"]