Travis build: 391

This commit is contained in:
Travis CI
2017-12-28 08:30:19 +00:00
parent ae7fbdc16d
commit 3cbd7040e9
141 changed files with 1389 additions and 1044 deletions

View File

@ -8,9 +8,11 @@ If the original array can't be split evenly, the final chunk will contain the re
```js
const chunk = (arr, size) =>
Array.from({length: Math.ceil(arr.length / size)}, (v, i) => arr.slice(i * size, i * size + size));
Array.from({ length: Math.ceil(arr.length / size) }, (v, i) =>
arr.slice(i * size, i * size + size)
);
```
```js
chunk([1,2,3,4,5], 2) // [[1,2],[3,4],[5]]
chunk([1, 2, 3, 4, 5], 2); // [[1,2],[3,4],[5]]
```