diff --git a/08-isAnagram/index.js b/08-isAnagram/index.js index 7176c94..a27523c 100644 --- a/08-isAnagram/index.js +++ b/08-isAnagram/index.js @@ -1,4 +1,11 @@ export function isAnagram(word1, word2) { // implementar logica aqui - + if (cleanString(word1) === cleanString(word2)) { + return true; + } else { + return false; + }; +} + function cleanString(str) { + return str.toLowerCase().split('').sort().join(); } \ No newline at end of file