forked from M3-Academy/challenge-algorithms-v2.0
7 lines
208 B
JavaScript
7 lines
208 B
JavaScript
export function isAnagram(word1, word2) {
|
|
// implementar logica aqui
|
|
const organiza = str =>
|
|
str.toLowerCase().split('').sort().join('');
|
|
|
|
return organiza(word1) === organiza(word2);
|
|
} |