Answers for "remove array item if item exist in another array"

1

remove item from array if exists in another array

myArray = myArray.filter( function( el ) {
  return !toRemove.includes( el );
} );
Posted by: Guest on September-30-2021
0

remove item from array if exists in another array

$filteredFoo = array_diff($foo, $bar);
Posted by: Guest on December-07-2020

Code answers related to "remove array item if item exist in another array"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language