Merge pull request 'feat(isAnagram): algoritmo criado.' (#8) from feature/algorithm08 into development

Reviewed-on: #8
This commit is contained in:
Luiz Felipe Silva 2022-11-01 01:33:13 +00:00
commit efa764ec1f

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;
}