Functionschunkchunk Callablechunk<T>(array: T[], chunk_size: number): T[][]Splits an array into chunks of a specified size.@example// Returns [[1, 2], [3, 4], [5]]chunk([1, 2, 3, 4, 5], 2);// Returns [['a', 'b', 'c'], ['d', 'e', 'f']]chunk(['a', 'b', 'c', 'd', 'e', 'f'], 3);Type parametersT
Splits an array into chunks of a specified size.