forked from M3-Academy/challenge-algorithms-v2.0
feat(isAnagram): funcao feita
This commit is contained in:
parent
e92bfc7d68
commit
9861989bed
@ -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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user