feat(isAnagram): algoritmo criado. #8

Merged
luizfelipe9627 merged 1 commits from feature/algorithm08 into development 2022-11-01 01:33:14 +00:00

View File

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