Group Array Elements Javascript Tutorial Point