6 lines
221 B
JavaScript
6 lines
221 B
JavaScript
export function isAnagram(word1, word2) {
|
|
// implementar logica aqui
|
|
var y = word1.toLowerCase().split("").sort().join(""),
|
|
z = word2.toLowerCase().split("").sort().join("");
|
|
return (z === y) ? true : false;
|
|
} |