I want to create with transforming old array.
arr1 = [ 4, 26, 40, 53, 58, 68, 73, 86, 91, 114, 119, 132, 137, 147, 152, 165, 170, 183, 188, 201, 206, 208, 215, 220, 233, 238, 250, 255, 267, 272, 284, 289, 301, 306, 318, 323 ]
I want to create like
newArr = [[4,5,6,7,8,9,10 ..., 24,25], [26,27,28 ..., 39], [40,...,52], ...]
As you see in arr1, the number is the beginning, and the next item - 1 is the last number. How I can do like this. The last number is 325 in arr1
I tried chunk_array, but it does not work.
...]?