forked from M3-Academy/challenge-algorithms-v2.0
10 lines
264 B
JavaScript
10 lines
264 B
JavaScript
export function isAnagram(word1, word2) {
|
|
// implementar logica aqui
|
|
word1 = word1.toUpperCase().split('').sort().join('');
|
|
word2 = word2.toUpperCase().split('').sort().join('');
|
|
if(word1 === word2) {
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
} |