D
David
Hi all,
If I have an array with multiple entries that are the same. How can I split
them up into separate arrays by this criteria?
var myArry =
("cars","cars","cars","cars","sticks","sticks","sticks","trees","trees");
The desired result would separate this array into 3 arrays. The result being
a multidimensional array would be fine.
myNewArry =
[["cars","cars","cars","cars"],["sticks","sticks","sticks"],["trees","trees"]];
David
If I have an array with multiple entries that are the same. How can I split
them up into separate arrays by this criteria?
var myArry =
("cars","cars","cars","cars","sticks","sticks","sticks","trees","trees");
The desired result would separate this array into 3 arrays. The result being
a multidimensional array would be fine.
myNewArry =
[["cars","cars","cars","cars"],["sticks","sticks","sticks"],["trees","trees"]];
David