(Javascript) The first line of a while operation sets the counter. *Type the keyword that begins the second line*, plus the 2 characters that follow the keyword
2. Open Ended
30 seconds
1 pt
(Javascript) What is the last character of the first line of a while statement?
3. Fill in the Blank
30 seconds
1 pt
(Javascript) Instead of a *while* loop, you can always use a ______ loop.
4. Open Ended
30 seconds
1 pt
(Javascript) Type the last line of a while statement.
5. Open Ended
30 seconds
1 pt
(Javascript) Code the first line of a while loop. The loop runs as long as i is less than 6.
6. Open Ended
30 seconds
1 pt
(Javascript) Code the rest of the while loop. With each loop, add the value of i to total, which has been declared beforehand. The loop runs 100 times.
while (i <= 99) {
7. Open Ended
30 seconds
1 pt
(Javascript) Code the statement that needs to run above this line of code.
while (i <= 144) {
8. Open Ended
30 seconds
1 pt
(Javascript) Code a *while* loop that runs twice and does nothing. The counter i has already been declared and assigned 0.
9. Open Ended
30 seconds
1 pt
(Javascript) Code a while loop that adds *i* to *tot* with each iteration. Use i > 0 as the loop limiter.
var tot = 0;
var i = 10;
10. Open Ended
30 seconds
1 pt
(Javascript) Code a while loop that looks for "pig" in the array. When it finds it, an alert displays saying, "Found it!" Use the length of the array as the loop limiter. Break out of the loop when it's found.
11. Open Ended
30 seconds
1 pt
(Javascript) Code an alert that loops 3 times, alerting the value of the counter each time.