4 lines
217 B
JavaScript
4 lines
217 B
JavaScript
export function isAnagram(word1, word2) {
|
|
// implementar logica aqui
|
|
return word1.length !== word2.length ? false : word1.toLowerCase().split('').sort().join('') === word2.toLowerCase().split('').sort().join('')
|
|
} |