Adds news Object.groupBy(iterable, groupCallback) and Map.groupBy(iterable, groupCallback) to perform a grouping or bucketing operation. The Object method returns a plain object, where the groups are property keys. The Map method returns a Map, where the keys can be arbitrary values.
From the proposal explainer: Array grouping is an extremely common operation, best exemplified by SQL's GROUP BY clause and MapReduce programming (which is better thought of map-group-reduce). The ability to combine like data into groups allows developers to compute higher order datasets, like the average age of a cohort or daily LCP values for a webpage.
Explainers: https://github.com/tc39/proposal-array-grouping/blob/main/README.md