Created
May 11, 2014 07:23
-
-
Save IrakliJani/7f674325b54890484fa0 to your computer and use it in GitHub Desktop.
Kata solution for Node.js group Georgia
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 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