feat: Soluciona o exercício 08 - Is anagram

This commit is contained in:
Eleonora Otz de Mendonça Soares 2022-10-28 16:41:45 -03:00
parent 3cdeba11dd
commit 2d18f109e1

View File

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