1 line of code: How to count all occurrences in an Array
const occurrenceMap = arr =&gt; arr.reduce((acc, current) =&gt; (acc[current] = (acc[current] || 0)...
Tags: javascript, webdev, productivity, codequality