It will create an array of elements, split into groups the length of size. If the array can't be split evenly, the final chunk will be the remaining elements.
size
1.0.0
chunk([1, 2, 3]);// => [[1], [2], [3]] Copy
chunk([1, 2, 3]);// => [[1], [2], [3]]
chunk([1, 2, 3, 4, 5], 2);// => [[1, 2], [3, 4], [5]] Copy
chunk([1, 2, 3, 4, 5], 2);// => [[1, 2], [3, 4], [5]]
It will create an array of elements, split into groups the length of
size
. If the array can't be split evenly, the final chunk will be the remaining elements.