Creates an array of elements split into groups the length of size. If array can't be split evenly, the final chunk will be the remaining elements.
array
size
The array to chunk.
The length of each chunk.
the new 2D array of chunks.
Creates an
array
of elements split into groups the length ofsize
. Ifarray
can't be split evenly, the final chunk will be the remaining elements.