diff --git a/08-isAnagram/index.js b/08-isAnagram/index.js index 918308a..8fb140e 100644 --- a/08-isAnagram/index.js +++ b/08-isAnagram/index.js @@ -1,4 +1,8 @@ export function isAnagram(word1, word2) { // implementar logica aqui + let array1 = word1.toLowerCase().split('').sort(); + let array2 = word2.toLowerCase().split('').sort(); + if(array1.join() === array2.join()) return true; + else return false; } \ No newline at end of file