I have 2 arrays that they are identical at first but the user may remove (not able to add but just remove) items from the second array. I want to find items that are in the first array but not in the second one.
I can think of several ways to do this, but as these arrays can be very large, I'm curious to find out if anyone can offer a more efficient way:
$.grep( firstArray, function( n, i ){
return $.inArray(n, secondArray) == -1;
});