0

What is wrong with my code

https://code.sololearn.com/W05pQXQOlymv/#js Whenever I run the code I get the error: Uncaught TypeError: Cannot set property 'innerhtml' of null Line: 1

13th Nov 2017, 2:02 PM
hunter dante
hunter dante - avatar
3 Answers
+ 3
You don't have an HTML element that's named 'demo.' So place id="demo" on whatever element you're trying to reference.
13th Nov 2017, 2:07 PM
AgentSmith
+ 1
<div id="demo"></div>
13th Nov 2017, 2:50 PM
AgentSmith
0
Could you show an example of how to go about doing this?
13th Nov 2017, 2:26 PM
hunter dante
hunter dante - avatar