I have the following code (very simple)
if (document.getElementById(id).checked == false)
document.getElementById(id).checked = true;
And it works perfectly, but it shows the following error
As I said before, it works. But I need to eliminate that error to compile the first time.