Skip to content

Instantly share code, notes, and snippets.

@aromig
Created December 20, 2017 17:33
Show Gist options
  • Save aromig/55e875a747db39c4752dc7e76d3d1da1 to your computer and use it in GitHub Desktop.
Save aromig/55e875a747db39c4752dc7e76d3d1da1 to your computer and use it in GitHub Desktop.
function isAnagram(phrase1, phrase2) {
return phrase1.split("").sort().join("") === phrase2.split("").sort().join("");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment