How many times will the following loop print the word loop to the screen? var in
ID: 3619884 • Letter: H
Question
How many times will the following loop print the word loop to the screen? var index = 0; while (index < 3) { window.document.writeln("loop"); index++; }A) 1
B) 2
C) 3
D) 4
Keeping browser incompatibilities aside, an event can be registered except:
A) (input type="button" id="btn" name="btn" value="Click" /)
B) document.getElementById("btn").onclick = function() { alert("handler!"); }
C) document.getElementById("btn").addEventListener("onclick", handler, false);
D) document.getElementById("btn").addEventListener("click", handler, false);
Explanation / Answer
How many times will the following loop print the word loop to the screen? C) 3 Keeping browser incompatibilities aside, an event can be registered except: B) document.getElementById("btn").onclick = function() { alert("handler!"); }
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.