Skip to content

Instantly share code, notes, and snippets.

@anacunha
Created February 5, 2020 17:46
Show Gist options
  • Save anacunha/b04afac3fcfcaa00059dc8b15898e72c to your computer and use it in GitHub Desktop.
Save anacunha/b04afac3fcfcaa00059dc8b15898e72c to your computer and use it in GitHub Desktop.
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