Travis build: 1402

This commit is contained in:
30secondsofcode
2018-01-24 14:39:25 +00:00
parent cfcb8a2ba1
commit f738884baf
3 changed files with 29 additions and 4 deletions

View File

@ -6,9 +6,7 @@ Use `Array.reduce()` to apply the given function to the given array, storing eac
```js
const reduceSuccessive = (arr, fn, acc) =>
arr.reduce((res, val, i, arr) => (res.push(fn(res.slice(-1)[0], val, i, arr)),res), [
acc,
]);
arr.reduce((res, val, i, arr) => (res.push(fn(res.slice(-1)[0], val, i, arr)), res), [acc]);
```
```js