Build README

Also shorten syntax in objects from key-value pairs.
This commit is contained in:
Angelos Chalaris
2017-12-12 16:09:44 +02:00
parent 04553555b1
commit 002fd4fa79
2 changed files with 2 additions and 2 deletions

View File

@ -3,5 +3,5 @@
Use `Array.reduce()` to create and combine key-value pairs.
```js
const objectFromPairs = arr => arr => arr.reduce((a,b) => { a[b[0]] = b[1]; return a;}, {});
const objectFromPairs = arr => arr => arr.reduce((a,b) => (a[b[0]] = b[1], a), {});
```