lundi 4 septembre 2017

Group Array By Range Value

I have this array [1,1,2,2,2,3,4,4,5,6,6,6,7], may I group the array according to the range value, so get the final result:

'1-3' = [1,1,2,2,2,3]; // Count is 6 '4-5' = [4,4,5]; // Count is 3 '6-7' = [6,6,6,7]; // Count is 4



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire