JS error to fix ... | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 5

JS error to fix ...

Hi, my JS code is working well in my browser but not here in the sololearn playground. Can someone explain me why, I would like to understand and fix it before adding content ... https://code.sololearn.com/W2ujCJvirUQy/?ref=app

25th Apr 2019, 1:29 PM
Jess
Jess - avatar
4 Respostas
+ 6
Lol ok I fixed it ... Thank you, I'm shameful it was so simple ... šŸ˜Œ
25th Apr 2019, 2:05 PM
Jess
Jess - avatar
25th Apr 2019, 8:42 PM
Jess
Jess - avatar
+ 2
its because the js code run before the page load. use onload listener on body to make sure the script run after the page loaded
25th Apr 2019, 1:43 PM
Taste
Taste - avatar
+ 2
Jess There is nothing shameful about it. The simplest things can be the easiest to miss. This is programming after all where a single missing symbol can cause an entire program to mess up or not run at all šŸ˜‰
25th Apr 2019, 6:52 PM
Decimis ā€  š•Æš–Šš–ˆš–Žš–’š–Žš–˜
Decimis ā€  š•Æš–Šš–ˆš–Žš–’š–Žš–˜ - avatar