+ 1
timer function inside function
its a timer. pretty self explanatory. its inside a function which the timer itself is a function and every time you click the New Game button it goes down 1 but i want it so when you click the new game button its goes down all the way to 0 wothout clicking 10 times. https://code.sololearn.com/WmDqB7JwVfKT/?ref=app
10 Answers
+ 1
It's the timer. pretty self-explanatory.
You should look closely at line 70 since it is the heart of your timerf function.
+ 1
interval = setTimeout(timerf, 1000); // at line 70
0
i dont see anything at line 70 ODLNT
0
on conputer, why does my alert pop up first then my timer goes to 0 but on mobile it doesnt do that?
0
also how can i fix that
0
Your Mom
I suggest you finish the CSS and Javascript courses it will benefit you a lot and your programs will be much better.
0
SoloProg you know the answer or not? need me to explain better? or is the answer in the lessons
0
mmm no
very sry Oo"
0
SoloProg its alr. i should probably finish the course
0
Your Mom
window.onload = () => {
// Execute a JavaScript immediately after a page has been loaded
}