Skip to content

Instantly share code, notes, and snippets.

@a-eid
Created October 6, 2016 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save a-eid/557a602ca76ea64d880db7299a14cedc to your computer and use it in GitHub Desktop.
Save a-eid/557a602ca76ea64d880db7299a14cedc to your computer and use it in GitHub Desktop.
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