S
Sam Kong
Hello,
What's the best way to do the following?
[1,2,3,4,5,6,7,8,9] => [[1,2,3],[4,5,6],[7,8,9]]
I want to transform the array into an array of arrays with fixed number
of elements.
I think there should be a method but I can't find it.
I can iterate the elements using a counter to divide but it's so
boring.
Thanks in advance.
Sam
What's the best way to do the following?
[1,2,3,4,5,6,7,8,9] => [[1,2,3],[4,5,6],[7,8,9]]
I want to transform the array into an array of arrays with fixed number
of elements.
I think there should be a method but I can't find it.
I can iterate the elements using a counter to divide but it's so
boring.
Thanks in advance.
Sam