Created
February 25, 2014 22:41
-
-
Save jtpaasch/9219512 to your computer and use it in GitHub Desktop.
Find the list of items that are in both of two lists.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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