I have following two arrays
let a = ["Hello", "bye", "good morning", "test"];
let b = ["Hello", "test"];
How can i delete items that exists in array b from array a(without mutation)? The resultant array should look like:-
["bye", "good morning"];
I have following two arrays
let a = ["Hello", "bye", "good morning", "test"];
let b = ["Hello", "test"];
How can i delete items that exists in array b from array a(without mutation)? The resultant array should look like:-
["bye", "good morning"];
 
    
    filter() and some()
let a = ["Hello", "bye", "good morning", "test"],
    b = ["Hello", "test"],
    c = a.filter( e => !b.some( i => i===e))
