Breaks an array into chunks of length size. If useRemaining is set to true (default),
then any extra elements at the end not long enough for a complete chunk will be
included as a shorter array. If useRemaining is false, the remaining elements that
do not comprise a complete chunk will be ignored.
Breaks an array into chunks of length
size
. IfuseRemaining
is set totrue
(default), then any extra elements at the end not long enough for a complete chunk will be included as a shorter array. IfuseRemaining
isfalse
, the remaining elements that do not comprise a complete chunk will be ignored.Remarks
Returns
null
ifsize
is not a positive integer.Example