Created
June 15, 2016 05:35
-
-
Save mytholog/7cd8286e32965cbaab463d11a367fbaa 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
var counts = {}; | |
array.forEach(function(x) { counts[x] = (counts[x] || 0)+1; }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment