feat(isAnagram): funcao feita #8

Merged
NicollyVieira merged 1 commits from feature/isAnagram into development 2022-10-28 18:08:24 +00:00
Showing only changes of commit 9861989bed - Show all commits

View File

@ -1,4 +1,7 @@
export function isAnagram(word1, word2) {
// implementar logica aqui
let primeiraString = word1.toLowerCase().split('').sort().join('');
let segundaString = word2.toLowerCase().split('').sort().join('');
return primeiraString === segundaString ? true : false;
}