how to remove a specific item from a list in javascript code example
Example 1: how to delete an element from an array
var array = [123, "yee", true];
array.pop(index);
Example 2: remove elemtns from an array with splice
var fruits = ["Banana", "Orange", "Apple", "Mango", "Kiwi"];
document.getElementById("demo").innerHTML = fruits;
function myFunction() {
fruits.splice(2, 2);
document.getElementById("demo").innerHTML = fruits;
}