const arr1 = ["a", "b", "c", "d", "e"];
const arr2 = ["b", "d"];
I need to do something which remove "b" and "d" from arr1. Of course I need to remove elements from arr1 which exist in arr2 too.
const arr1 = ["a", "b", "c", "d", "e"];
const arr2 = ["b", "d"];
I need to do something which remove "b" and "d" from arr1. Of course I need to remove elements from arr1 which exist in arr2 too.
const arr1 = ["a", "b", "c", "d", "e"];
const arr2 = ["b", "d"];
let result = arr1.filter(el => !arr2.includes(el));
console.log(result);