Apr-07-2019, 02:51 AM
Hi,
I was wondering how I could split a large array into smaller chunks?
For example:
And I want to split the array into:
If someone could please help, I would gladly appreciate it.
Thanks!
I was wondering how I could split a large array into smaller chunks?
For example:
1 |
arr = [ "hello" , "my" , "name" , "is" , "name" , "hello" , "my" , "name" , "is" , "name2" , "hello" , "my" , "name" , "is" , "name3" ] |
1 |
arr2 = [[ "hello" , "my" , "name" , "is" , "name" ], [ "hello" , "my" , "name" , "is" , "name2" ], "hello" , "my" , "name" , "is" , "name3" ] |
Thanks!