Deviopath › JavaScript

Count Occurrences

Easy · Objects

Write a function countOccurrences that returns an object where each key is an item from the array and each value is how many times it appears.

Next: Lookup by ID