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

7 lines
180 B
JavaScript
Raw Permalink Normal View History

export function isAnagram(word1, word2) {
// implementar logica aqui
return word1.toLowerCase().split("").sort().join() === word2.toLowerCase().split("").sort().join();
}