feat(desafio): Adiciona oitava tarefa concluida

This commit is contained in:
Manuela Luana Schumacker Tavares 2022-10-28 16:26:00 -03:00
parent 663341a99a
commit a9b425e213

View File

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