Skip to content

Instantly share code, notes, and snippets.

@jimmont jimmont/anagramDetector
Last active Aug 29, 2015

What would you like to do?
your anagrams are showing doctor
/* usage: isAnagram('Elvis','lives'); */
function isAnagram(read,dear){
return read.toLowerCase().split('').sort().join('') === dear.toLowerCase().split('').sort().join('');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.