desafio 08 concluido

This commit is contained in:
Douglas Vinicius Nobrega 2022-10-28 18:59:25 -03:00
parent 906028da29
commit 35269078e8

View File

@ -1,4 +1,10 @@
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;
}
} }