Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

Object.groupBy()

2 tags 1 category

Note: In some versions of some browsers, this method was implemented as the method Array.prototype.group(). Due to web compatibility issues, it is now implemented as a static method. Check the browser compatibility table for details.

The Object.groupBy() static method groups the elements of a given iterable according to the string values returned by a provided callback function. The returned object has separate properties for each group, containing arrays with the elements in the group.

This method should be used when group names can be represented by strings. If you need to group elements using a key that is some arbitrary value, use Map.groupBy() instead.

Syntax example: Object.groupBy(items, callbackFn)

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…