Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

remove multiple values from array javascript

const nums = [1, 2, 3, 4, 5, 6];
const remove = [1, 2, 4, 6];

function removeFromArray(original, remove) {
  return original.filter(value => !remove.includes(value));
}
 
PREVIOUS NEXT
Tagged: #remove #multiple #values #array #javascript
ADD COMMENT
Topic
Name
3+1 =