Created
May 15, 2019 14:27
-
-
Save BetterProgramming/8a984456bbc290c9620d0d5bb4b94e4f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export function chunk(arr, size) { | |
| const R = []; | |
| for (var i = 0, len = arr.length; i < len; i += size) | |
| R.push(arr.slice(i, i + size)); | |
| return R; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment