Brian Jenney
Dec 15, 2024

--

I was considering showing the example with `map` but I assumed it might be more confusing for early coders. As for sorting the array - you won't get the counts for each value but you would get the highest and lowest counts. That's not a bad solution but in the worst case, it would be less performant than simply iterating and tracking highest/lowest.

--

--

Brian Jenney
Brian Jenney

Written by Brian Jenney

full-stackish developer, late bloomer coder and power google user and owner of Parsity.io

No responses yet