Apply new format to snippets and template
This commit is contained in:
@ -5,8 +5,8 @@ tags: array,object,intermediate
|
||||
|
||||
Groups the elements of an array based on the given function and returns the count of elements in each group.
|
||||
|
||||
Use `Array.prototype.map()` to map the values of an array to a function or property name.
|
||||
Use `Array.prototype.reduce()` to create an object, where the keys are produced from the mapped results.
|
||||
- Use `Array.prototype.map()` to map the values of an array to a function or property name.
|
||||
- Use `Array.prototype.reduce()` to create an object, where the keys are produced from the mapped results.
|
||||
|
||||
```js
|
||||
const countBy = (arr, fn) =>
|
||||
|
||||
Reference in New Issue
Block a user