+ 1
When n.innerHTML < 0 it doesn't give me an alert why?
https://code.sololearn.com/Wzxfio8mM2cg/?ref=app I am making a timer so when n.innerHTML < 0 I want the counting down to stop
4 ответов
+ 2
your js corrected/fixed:
https://code.sololearn.com/WGsTixA3l6u1/?ref=app
+ 3
because it is still stuck at setInterval() , you should set pause function that will
execute when it n reaches 0 (by using clearInterval())
also i suggest you to refactor your code it is not a clean code
this is how i handle it
https://github.com/NimaPoshtiban/JavaScript-Projects-timer/blob/master/timer.js
0
I am making a timer so when n.innerHTML < 0 I want the counting down to stop
0
Thanks