How can I group the same numbers in an array within an array?
I have the following array of numbers:
var arr = [1,1,1,1,2,2,3,3,3,4,5,5,6];
My output should be
[[1,1,1,1],[2,2],[3,3,3],4,[5,5],6]
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…