Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

remove all elements contained in another array

var toRemove = ['b', 'c', 'g'];
myArray = myArray.filter( ( el ) => !toRemove.includes( el ) );
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #elements #contained #array
ADD COMMENT
Topic
Name
1+5 =