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

5 lines
179 B
JavaScript
Raw Normal View History

export function isAnagram(word1, word2) {
// implementar logica aqui
2022-11-02 19:40:23 +00:00
return word1.toLowerCase().split("").sort().join("") === word2.toLowerCase().split("").sort().join("");
}