I would like to compare two arrays in jquery and return a new array of all the elements that do not match. so if I build a function like so:
function (parent, child) {}
I should compare child
to parent
and return a new array of all the elements in child that do not match parent. an example would be
parent = ['apple', 'banana'];
child = ['fruit'];
compare child to parent and get back and array: ['fruit']
as fruit
is not in parent. I looked for methods to do this and saw this solution but I am not sure if this is what I want or not.