feat: Adiciona o código do desafio 8
This commit is contained in:
parent
053f15c827
commit
fa1f7a6cd0
@ -1,4 +1,6 @@
|
|||||||
export function isAnagram(word1, word2) {
|
export function isAnagram(word1, word2) {
|
||||||
// implementar logica aqui
|
// implementar logica aqui
|
||||||
|
var y = word1.toLowerCase().split("").sort().join(""),
|
||||||
|
z = word2.toLowerCase().split("").sort().join("");
|
||||||
|
return (z === y) ? true : false;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user