Created
February 5, 2020 17:46
-
-
Save anacunha/b04afac3fcfcaa00059dc8b15898e72c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function evenWord(word) { | |
const odds = new Set(); | |
for(const letter of word) { | |
odds.has(letter) ? odds.delete(letter) : odds.add(letter); | |
} | |
return odds.size; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment