ran npm run builder

This commit is contained in:
King
2017-12-21 07:26:40 -05:00
parent 2ba9279b8c
commit 4ff3f4f5fd

View File

@ -1242,7 +1242,7 @@ Use `Array.reduce()` to add values into the array, using the sum of the last two
```js
const fibonacci = n =>
Array(n).fill(0).reduce((acc, val, i) => acc.concat(i > 1 ? acc[i - 1] + acc[i - 2] : i), []);
Array.from({ length: n}).map(v => 0).reduce((acc, val, i) => acc.concat(i > 1 ? acc[i - 1] + acc[i - 2] : i), []);
// fibonacci(5) -> [0,1,1,2,3]
```