0
Can you help me getting rid of a error please I m a beginner .
Javascript error https://code.sololearn.com/WqIE9mKl859H/?ref=app
6 Respostas
+ 2
Put all your javascript inside window.onload = function (){
}
Also you need to use # for referring to id using document.querySelector()
https://code.sololearn.com/WP9Rx4jqg5SH/?ref=app
+ 2
You can leave the result function outside of the window.onload function, since you're using the HTML elements onlick= attribute. This way it will be in scope. Otherwise, handle it similar to your start button.
You can actually leave your start function itself outside of the window.onload too as the addeventlistener function will have access to it from within the onload function, but it will also work from within it.
+ 1
I fixed some of your code but there are still issues try to debug yourself
+ 1
Thankyou so much for clarifying the things..🙂
0
Ok
0
Thankyou so much for help..😊