update snippets 1-15

This commit is contained in:
Stefan Feješ
2017-12-25 13:59:23 +01:00
parent 8de8fd93aa
commit 9b57350525
15 changed files with 67 additions and 26 deletions

View File

@ -6,5 +6,8 @@ Use `Array.reduce()` to add each value to an accumulator, initialized with a val
```js
const arrayAverage = arr => arr.reduce((acc, val) => acc + val, 0) / arr.length;
// arrayAverage([1,2,3]) -> 2
```
```js
arrayAverage([1,2,3]) -> 2
```