[Solved] Text not changing using DOM. Error message says “cannot set property ‘innerHTML’ of null”


Whenever you are mentioning any strings you have to keep it in quotations otherwise it will take it as variable name.

So do this minor change in your code and check.

document.getElementById("output").innerHTML = inumber;

solved Text not changing using DOM. Error message says “cannot set property ‘innerHTML’ of null”