Trying an example given in the DOM lesson but it is not working
I am trying to use the following example given under DOM --> Selecting Elements var elem = document.getElementByID("demo"); elem.innerHTML = "Hello World"; I made a new html document titled 'Practice.html' here is the code: <!DOCTYPE html> <head> <meta charset="utf-8"> <script type="text/javascript" src="jsPractice.js"> </script> </head> <body> <div id="demo">Hello</div> </body> I also made a new javascript file called 'jsPractice.js' here is the content: var elem = document.getElementByID("demo"); elem.innerHTML = "Hello World"; I saved both in the same folder. I am using Brackets program for this and have the live view open in a Chrome window. However all that is displayed is the word 'Hello'. I thought using this javascript code that it would be changed to "Hello World" but it is not. Can anyone help me understand what went wrong?