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