Updated snippets

Mainly for better readability
This commit is contained in:
Angelos Chalaris
2017-12-12 18:21:53 +02:00
parent 7758e59f0e
commit e2d2b6aa41
5 changed files with 12 additions and 14 deletions

View File

@ -3,7 +3,6 @@
Use `reduce()` to add each value to an accumulator, initialized with a value of `0`.
```js
const sum = arr =>
arr.reduce( (acc , val) => acc + val, 0);
const sum = arr => arr.reduce( (acc , val) => acc + val, 0);
// sum([1,2,3,4]) -> 10
```