challenge-algorithms-v2.0-P.../08-isAnagram/index.js

7 lines
217 B
JavaScript
Raw Normal View History

export function isAnagram(word1, word2) {
2022-11-02 04:34:44 +00:00
let str1 = word1.toLowerCase().split("").sort().join("");
let str2 = word2.toLowerCase().split("").sort().join("");
return str1 === str2;
// implementar logica aqui
2022-11-02 04:34:44 +00:00
}