remove an array element code example
Example 1: remove a particular element from array
var colors = ["red","blue","car","green"];
var carIndex = colors.indexOf("car");
colors.splice(carIndex, 1);
Example 2: how to delete an element from an array
var array = [123, "yee", true];
array.pop(index);
Example 3: remove element from array javascript
let numbers = [1,2,3,4]
let lastElem = numbers.pop()
let firstElem = numbers.shift()
Example 4: how to delete an element from an array in javascript
["bar", "baz", "foo", "qux"]list.splice(0, 2)