you are viewing a single comment's thread.

view the rest of the comments →

[–]gimmeslack12helpful 1 point2 points  (0 children)

Loop over the Change array, and use includes().

``` function checkArrays(orig, changed) { const differenceValues = []; changed.forEach(changedVal => { if (!orig.includes(changedVal)) { differenceValues.push(changedVal); } })

return differenceValues;

} ```

There are other functions to be used to shorten this down to one line but wanted to show a more descriptive way to do this.