Last active
August 29, 2015 14:02
-
-
Save jimmont/6914428a104d1b569d9e to your computer and use it in GitHub Desktop.
your anagrams are showing doctor
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
/* 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