how delete all value that match from array js code example
Example 1: js remove if
ar = [1, 2, 3, 4];
ar = ar.filter(item => !(item > 3));
console.log(ar) // [1, 2, 3]
Example 2: remove element from array javascript
let values = [1,2,3,4,5,7,8,9,10]
// only keep n values from an array
values.length = 5