+ 2
this code is not working
I get an error 'getElementById' is not defined Line: 8 in this code var button = getElementById('button'); var count = 0; while (true){ if (button.val === true){ count += 1; } counter.innerHTML = count; } var counter = getElementById('counter');
2 Answers
+ 5
document.getElementById()
not::
getElementById
+ 2
"document" is missing!!
it should be
document. getElementById("button").