Last Updated: May 23, 2017
·
208
· Codi

Find / compute the difference between two arrays in Javascript

There is a lightweight array-diff open source component you can use for finding the difference between two Javascript arrays.

Here is an example:

diff([1,2,3], [1,2,3,4,5]) // => [4,5]