Created
April 28, 2019 19:51
-
-
Save danilowoz/6d899a9f19c5a47bb681ca1400622de5 to your computer and use it in GitHub Desktop.
Getting the categories
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
const countCategories = categories.reduce((prev, curr) => { | |
prev[curr] = (prev[curr] || 0) + 1 | |
return prev | |
}, {}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment