deleting elements of array by filter in js code example
Example 1: remove a specific element from an array
array.splice(array.indexOf(item), 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))