Created
October 6, 2016 16:09
-
-
Save a-eid/557a602ca76ea64d880db7299a14cedc to your computer and use it in GitHub Desktop.
This file contains 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_anagrams = function(arr , word){ | |
return arr.filter(function(item){ | |
for(var l in word){ | |
if(item.indexOf(word[l]) == -1) return false; | |
} | |
return true; | |
}) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment