Update snippet descriptions
This commit is contained in:
@ -8,7 +8,8 @@ Creates an object from the given key-value pairs.
|
||||
- Use `Array.prototype.reduce()` to create and combine key-value pairs.
|
||||
|
||||
```js
|
||||
const objectFromPairs = arr => arr.reduce((a, [key, val]) => ((a[key] = val), a), {});
|
||||
const objectFromPairs = arr =>
|
||||
arr.reduce((a, [key, val]) => ((a[key] = val), a), {});
|
||||
```
|
||||
|
||||
```js
|
||||
|
||||
Reference in New Issue
Block a user