Skip to content
Advertisement

JS how to group hh:mm – hours arrays without minutes

How can we group hour arrays according to hours.

JavaScript

As you see, an hour has multiple minute, like 22:37, 22:52.
I want to create new array like

JavaScript

It contains two days hours.

I tried like this

JavaScript

But it gives me this result

enter image description here

Advertisement

Answer

JavaScript

Update

Solution for several days:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement