SyntaxFix
Write A Post
Hire A Developer
Questions
How about the simplest possible:
var myArray = ['a', 'b', 'c', 'd', 'e', 'f', 'g'];_x000D_ var toRemove = ['b', 'c', 'g'];_x000D_ _x000D_ var myArray = myArray.filter((item) => !toRemove.includes(item));_x000D_ console.log(myArray)