Font size
Worksheets[Hall] While Loops
Total questions: 10
Worksheet time: 6mins
Goal = Create a loop that turns as long as i is less than 10.
What should replace ⭐?
>
<
>=
<=
Which is an example of a variable?
counter
"counter"
Goal = Create a loop that increases i by 2 each time.
What should replace ⭐?
i += 2
i ++
i = i + 2
+2
Which is an example of a string?
counter
"counter"
What is a value for ⭐ that would prevent the loop from ever running?
10
0
1
-5
Goal = Create a loop that increases i by 1 each time.
What should replace ⭐?
i += 1
i ++
i + 2
i += 2
What JavaScript code matches this statement:
Their name is Jacob and they are less than 15 years old.
if(name = "Jacob" && age < 15)
if(name == "Jacob" && age < 15)
if(name == "Jacob" || age < 15)
if("name" == "Jacob" && age < 15)
What is a value for ⭐ that would prevent the loop from ever running?
10
15
100
11
What symbol represents the or operator in JavaScript?
OR
or
|
||
Goal = Create a loop that turns as long as i is greater than 10.
What should replace ⭐?
>
<
>=
<=
