forked from M3-Academy/challenge-algorithms-v2.0
7 lines
270 B
JavaScript
7 lines
270 B
JavaScript
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;
|
|
} |