feat: solucao isAnagram #8

Merged
Rafael_Sampaio_de_Oliveira merged 1 commits from feature/solucao-isAnagram into development 2022-10-28 13:55:53 +00:00

View File

@ -1,4 +1,11 @@
export function isAnagram(word1, word2) {
// implementar logica aqui
}
let str1 = word1.toLowerCase().split("").sort().join("");
let str2 = word2.toLowerCase().split("").sort().join("");
if (str1 === str2) {
return true;
} else {
return false;
}
}