Title: Quiz Week 3 Control Statements
Course: Fall 2023 - WEBD 164 (41934) > Section: Week 3 (Sep 5) How to Code Control Statements / More Operators

Q: The "if" condition is a commonly used control structure used to determine if a condition is true.
- True
- False
A: True

Q: In the below code, how many times will the statement inside the { } be executed?

var i;
for (i=0;   i<5;   i++)
{
document.write( "The number is "   +  i  +   "<br>");
}
- 1
- 5
- 4
- none
A: 5

Q: In the below code, how many times will the statement inside the { } be executed?

var i = 0;
do
{
document.write("The number is "   +  i +    "<br>");
i++;
}
while (i >5);
- 1
- 5
- 4
- none
A: 1