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]
Written by Codi
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Javascript
Authors
Did you know?
JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.
Security insights from Cside
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#