23rd Aug 2019, 7:54 AM
coffeecup
coffeecup - avatar
2 Réponses
0
https://code.sololearn.com/WO5NLcQ1470e/?ref=app
23rd Aug 2019, 8:01 AM
Bug Slayer
0
In JS this: document.getElementById("but").innerHTML searched an element from the HTML document, which has an id attribute assigned to "but". ( Example of tag with id attribute assigned to "but": <example id="but"> </example> ) Because there was no such element with that id in the HTML document, JS method "getElementById" returned null, which you tried to give a value: null = "something"; //error
23rd Aug 2019, 12:54 PM
Seb TheS
Seb TheS - avatar