Removing an element from the end of the array
This can be accomplished using the pop method. For example,
Example
let veggies = ["Onion", "Raddish"]; veggies.pop(); console.log(veggies);
Output
This will give the output −
["Onion"]
Removing an element from the end of the array
This can be accomplished using the pop method. For example,
let veggies = ["Onion", "Raddish"]; veggies.pop(); console.log(veggies);
This will give the output −
["Onion"]