feat: Adiciona o código do desafio 8

This commit is contained in:
Gabriel Gomes Fernandes 2022-10-31 14:00:03 -03:00
parent 053f15c827
commit fa1f7a6cd0

View File

@ -1,4 +1,6 @@
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;
}