What's the difference between writing JavaScript, in js panel and html panel on Sololearn? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

What's the difference between writing JavaScript, in js panel and html panel on Sololearn?

Because the following code gives an error on line 5, when js part is shifted to the js panel here. But it works as expected in html. https://code.sololearn.com/WHYla3IsQviX/?ref=app

2nd Jul 2018, 7:51 PM
Çůřîöş ßąšäñț 🇮🇳
Çůřîöş ßąšäñț 🇮🇳 - avatar
3 Answers
+ 2
Thanks「HAPPY TO HELP」 , for this. So how do I fix my problem, I'm just a beginner though.
2nd Jul 2018, 8:07 PM
Çůřîöş ßąšäñț 🇮🇳
Çůřîöş ßąšäñț 🇮🇳 - avatar
+ 2
appears to be working fine ~ no errors being displayed
2nd Jul 2018, 8:32 PM
BroFar
BroFar - avatar
+ 1
Many user would like know that all content in JS tab will be inserted into <head> like an inline script to "execution" time then your will be executed before DOM its loaded
2nd Jul 2018, 9:04 PM
KrOW
KrOW - avatar