Looking for help with organizing an Array:
var arr = ['a','a','b','b','b','c','d','d','a','a','a'];
I am aiming to achieve the following output:
[
['a','a'],
['b','b','b'],
['c'],
['d','d'],
['a','a','a'],
]
Note: The goal is to group only sequential repeated values, not all repeated values.
If anyone can assist me with this, I would greatly appreciate it!