No output to my code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

No output to my code

var elem = document.getElementById("demo"); elem.innerHTML ="Hello World"; Is there anything wrong with the code 'cause its not giving any output when i run it in browser. This is just to clarify my previous question.

21st Jul 2020, 6:45 PM
Obinna
Obinna - avatar
3 Answers
+ 1
Can you add complete code..?
21st Jul 2020, 6:55 PM
Jayakrishna 🇮🇳
0
I think you need to complete next chapter in same lesson - "Working with dom". There is complete example, run it by "try it yourself" and observe. It is used to change div elements but you should have div elements first. The example give clear idea. Go on...
21st Jul 2020, 7:09 PM
Jayakrishna 🇮🇳