this is my codepen
https://codepen.io/AbderrahmaneMustapha/pen/rNBjXVo
i need help to fix this
I think the problem is that the timer isn’t showing 00:00
, but rather it goes straight to 05:00
right after 00:01
.
the timer is showing 00 : 00 , i did a console.log(timer)
and i saw 00:00
Make sure the spaces around the “:” are not the problem
Edit: nevermind, sorry. I replied to the comment but I hadn’t check the pen yet
The timer does hit 00:00
and you can console.log
it, but you’re immediately switching to the next timer as soon as it hits, so you don’t see it on the page.
and do you have any idea how to fix this
!!!
Instead of checking the decremented timer, check its previous value (before subtracting the one second). Only trigger the timer switching when the previous value is 00:00
Maybe still wait another 1 second like the rest of the ticks before switching to the break/study session
thank you preoblem fixed
This was exactly my problem. 00:01 to 5:00. Thanks!