reduce

How to groupby using reduce in JavaScript

How to groupby using reduce in JavaScript

  • October 1, 2020

The groupBy method is one of the reasons people use lodash in their project. In this blog post, we will write our own version of groupBy using reduce and vanilla JavaScript. What groupBy does? groupBy works on an array of items, and it groups these items together into an object...