Splits an array into groups the length of size. If array can't be split evenly, the final chunk will be the remaining elements.
Chunk maximum size
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]]
Splits an array into groups the length of size. If array can't be split evenly, the final chunk will be the remaining elements.