Hi,
My countdown works but I don’t understand the seconds, if my timer is 5 (5 secs), then 5%60 doesn’t return 5, but 00.579… on a paper ?
When I using a calculator, I have 5%60 = 5 ?
line 12
seconds = parseInt(timer % 60, 10);
console.log(seconds );
Thanks
Not sure if maybe you resolved your issue since posting, but I can’t find the spot at which you’re getting 00.579? Could you give a little more detail on when this is happening, if you are indeed still having this issue?
I just calcul myself 00.579
5%60
5 / 60 the remain it’s 00.579…
But the result it’s 5?
How can I have this result?
Not sure where you’re calculating it, but 5/60 is .08333… and 5%60 is definitely 5. I checked your codepen and your timer seemed to be working fine, so I don’t think you have any problems. Let me know if you have any other questions, though. Keep it up!
ok, thanks
I changed my way to do it.