Remove parentheses for objectFromPairs argument

This commit is contained in:
Siarhei
2018-09-10 09:03:26 +04:00
parent b8296152d0
commit 9e51c0508a
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ Creates an object from the given key-value pairs.
Use `Array.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

View File

@ -1,2 +1,2 @@
const objectFromPairs = (arr) => arr.reduce((a, [key, val]) => ((a[key] = val), a), {});
const objectFromPairs = arr => arr.reduce((a, [key, val]) => ((a[key] = val), a), {});
module.exports = objectFromPairs;