Removing an element from the start of the array in javascript

Web DevelopmentFront End TechnologyJavascript

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"]
raja
Published on 26-Jun-2018 14:01:35
Advertisements