diff --git a/08-isAnagram/index.js b/08-isAnagram/index.js index 918308a..0168375 100644 --- a/08-isAnagram/index.js +++ b/08-isAnagram/index.js @@ -1,4 +1,16 @@ export function isAnagram(word1, word2) { // implementar logica aqui + const compare = str => + str + .toLowerCase() + .split('') + .sort() + .join(''); + + if(compare(word1) === compare(word2)){ + return true; + } + + return false; } \ No newline at end of file