feat(challenge): desafio anagrama finalizado

This commit is contained in:
Thiago Bronisio 2022-10-29 00:19:20 -03:00
parent eca76cda84
commit 3c77c0f310

View File

@ -1,4 +1,6 @@
export function isAnagram(word1, word2) { export function isAnagram(word1, word2) {
// implementar logica aqui // implementar logica aqui
word1 = word1.toLowerCase().split('').sort().join('');
word2 = word2.toLowerCase().split('').sort().join('');
return word1 === word2;
} }