Course · Section 9: Data Structures, Modern Operators and Strings · Lecture 118: Enhanced Object Literals
Implement `groupBy(arr, key)` returning an object that groups the items by the value of `item[key]`.
+ 1 hidden test run on Submit.
Iterating once and pushing each item into a group keyed by item[key] produces a map of arrays.
Run your code to see results.