Creates an array of elements split into groups the length of size. If collection can’t be split evenly, the final chunk will be the remaining elements.
The array to process.
Optional
The length of each chunk.
Returns the new array containing chunks.
Creates an array of elements split into groups the length of size. If collection can’t be split evenly, the final chunk will be the remaining elements.