Why is here error? (innerHTML) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Why is here error? (innerHTML)

Cannot set property 'innerHTML' of null How to fix this??? https://code.sololearn.com/WJqqDIl7dG7L/?ref=app

28th Jun 2018, 2:55 PM
Martin Sidorov
Martin Sidorov - avatar
3 Answers
+ 2
https://code.sololearn.com/W9n9L0Y6CyCz/?ref=app
28th Jun 2018, 4:43 PM
Calviղ
Calviղ - avatar
+ 4
Thank you!
10th Jul 2018, 8:07 AM
Martin Sidorov
Martin Sidorov - avatar
+ 2
as long as you pass the this keyword as argument to the add function you don't even need to do this: // document.getElementById(cell).InnerHTML = "X"; you can just do something like that: // cell.InnerHTML = "X";
28th Jun 2018, 3:34 PM
MO ELomari
MO ELomari - avatar