K
K
kuzubina2019-11-21 12:50:41
JavaScript
kuzubina, 2019-11-21 12:50:41

How to know the direction of the countdown timer?

Tell me pliz how to find out the direction of the countdown timer?
There is a function that, using setInterval , runs every 5 seconds and cycles through the array, each processed object has a timer for 30 minutes, but the catch is that in some objects the timer starts from 0 and counts up to 30 minutes, and in some it’s vice versa , the countdown goes from 30 to 0.
There are no distinctive elements in the structure.
How can you determine in which direction the timer is counting down and, for example, catch it at 20 minutes and output it to the console?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2019-11-21
@KickeRockK

No code needed.
Wait and see, the number has decreased - countdown,
increased - direct.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question