Skip to content

Instantly share code, notes, and snippets.

@aromig

aromig/isAnagram.js

Created Dec 20, 2017
Embed
What would you like to do?
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