Merge pull request 'feat(isAnagram): funcao feita' (#8) from feature/isAnagram into development

Reviewed-on: #8
This commit is contained in:
Nicolly Vieira Santos Costa 2022-10-28 18:08:23 +00:00
commit fc6eb1d4eb

View File

@ -1,4 +1,7 @@
export function isAnagram(word1, word2) {
// implementar logica aqui
let primeiraString = word1.toLowerCase().split('').sort().join('');
let segundaString = word2.toLowerCase().split('').sort().join('');
return primeiraString === segundaString ? true : false;
}