Hi, Why should l get an error Undefined Timerinr in my code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
13th Jul 2020, 7:38 AM
Egor Tonchev(EGO)
Egor Tonchev(EGO) - avatar
2 Answers
+ 2
Js script getting executed before loading of HTML Dom,you need to put all your js code in the following function window.onload=function(){ } Now js runs only after document is loaded
13th Jul 2020, 7:53 AM
Abhay
Abhay - avatar
+ 1
That's because the js part wasn't run when it was executed. And their was no Timerinr. https://code.sololearn.com/WqCN1AlKkknG/?ref=app
13th Jul 2020, 7:47 AM
Arnesh
Arnesh - avatar