You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
386 B

## Chunky
4 years ago
### Instructions
4 years ago
Create a function named `chunk` which accepts an array and an integer representing a size.
4 years ago
Your function will chunk the array into sub-arrays, and return an array with each sub-array as its elements. The length of each sub-array is denoted by the size argument.
If the array cannot be split evenly, the last sub-array will contain the remaining elements.