remove enter array index from array code example
Example 1: js remove from array by value
const index = array.indexOf(item);
if (index !== -1) array.splice(index, 1);
Example 2: how to delete element in list javascript
//using filter method
let itemsToBeRemoved = ["Sunday", "Monday"]
var filteredArray = myArray.filter(item => !itemsToBeRemoved.includes(item))