Skip to content

Instantly share code, notes, and snippets.

@IrakliJani
Created May 11, 2014 07:23
Show Gist options
  • Save IrakliJani/7f674325b54890484fa0 to your computer and use it in GitHub Desktop.
Save IrakliJani/7f674325b54890484fa0 to your computer and use it in GitHub Desktop.
Kata solution for Node.js group Georgia
function count (string) {
return string.split('').reduce(function (w, c) { return (w[c] ? w[c]++ : w[c] = 1) && w; }, {});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment