1var colors = ["red","blue","car","green"];
2var carIndex = colors.indexOf("car");//get "car" index
3//remove car from the colors array
4colors.splice(carIndex, 1); // colors = ["red","blue","green"]
1let value = 3
2
3let arr = [1, 2, 3, 4, 5, 3]
4
5arr = arr.filter(item => item !== value)
6
7console.log(arr)
8// [ 1, 2, 4, 5 ]
9
1> let array = ["a", "b", "c"];
2> let index = 1;
3> array.splice(index, 1);
4[ 'b' ]
5> array;
6[ 'a', 'c' ]
1pop - Removes from the End of an Array.
2shift - Removes from the beginning of an Array.
3splice - removes from a specific Array index.
4filter - allows you to programatically remove elements from an Array.