0

I am trying to create an unlimited number of sub arrays from one initial array. Each sub array can have a length of 1-3 but cannot exceed 3.

Example:

const initialArray = [1,2,3,4,5,6,7,8,9,10];

//Expected Output: [[1,2,3],[4,5,6],[7,8,9],[10]]
Apex
  • 53
  • 7

0 Answers0