Skip to content

Instantly share code, notes, and snippets.

@jtpaasch
Created February 25, 2014 22:41
Show Gist options
  • Save jtpaasch/9219512 to your computer and use it in GitHub Desktop.
Save jtpaasch/9219512 to your computer and use it in GitHub Desktop.
Find the list of items that are in both of two lists.
find_dupes = function (list1, list2) {
return list1.filter(function(x) { return list2.indexOf(x) > -1; });
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment