Entrega do Desafio #1

Merged
anacarolinaduartecavalcante merged 12 commits from feature/10-longestWords into master 2022-10-28 12:14:06 +00:00
Showing only changes of commit e78fc6780f - Show all commits

View File

@ -1,4 +1,11 @@
export function isAnagram(word1, word2) {
// implementar logica aqui
const Anagram = str =>
str
.toLowerCase()
.replace(/[^a-z0-9]/gi, '')
.split('')
.sort()
.join('');
return Anagram(word1) === Anagram(word2);
}