feat(isAnagram): Implementa função isAnagram

This commit is contained in:
danielmoliaribarbosa 2022-10-28 15:12:57 -03:00
parent b2048f61d8
commit 2cf01bdc9f

View File

@ -1,4 +1,4 @@
export function isAnagram(word1, word2) {
// implementar logica aqui
return (word1.toLowerCase().split('').sort().join('')) === (word2.toLowerCase().split('').sort().join(''))
}