0
Does anyone help me solve this problem? when I click on 0, it gets -2 and every click the chronometer accelerates!
20 ответов
+ 6
I've figure out the remove of the event handler. This makes it so you can put the number back to 10 and only have the two handlers decrementing the count preventing the same kind of timer issue you had.
https://code.sololearn.com/WcvgDcFjEEtN
+ 9
Basically, you prevent going below zero. The timer sped up because you kept adding a new decrement timer.
+ 7
Not the best method as the event handler should be cancelled, but this does prevent your issues.
https://code.sololearn.com/WOtnF9nug9Yv
+ 7
It was a win-win. I learned how to remove event handlers that I've never done before so thank you, too. I normally put my handlers in my HTML so, while I knew how to add them in JS, I had no clue about removing.
+ 7
Sure, but not within SoloLearn playground. Each run here is a reset server environment so no way to maintain the data.
+ 6
I've never done that as web development is not my goal. But, you should be able to write cookies with data to reload each time the page gets loaded.
+ 2
I don't understand what you are trying to do
+ 2
😱yeeess i love you brother ❤❤❤
+ 2
thank you!!😁🤙👏👏👏
+ 2
Yes, I understand, thanks for the help!
+ 2
yees 👏👏👏
+ 2
Thank you very much for the minute you had to help me thank you very much!
+ 2
❤❤❤ we won
+ 1
one last doubt Can I create a button to save the points?
+ 1
because I generated a mobile apk, what happens when I click on the diamond and I exit the app it does not save at the point that it stopped it comes back all over again! when I come in again.
+ 1
I understand, but will there be a way to make the points continue where they stopped when I close the app and reopen?
+ 1
ok😁🤙
0
click on the diamond until it reaches 0 then you click again and there it will appear -2 then you will click again -4 and the timer will be getting faster I want to take it off!
0
The more you click the timer, the faster you risk restarting faster!