Grouping data by a property is one of the most useful patterns. Let's build our own groupBy function!
groupBy
groupBy(array, key)
key
products
category
Submit your code to see test results