// Practice Set · JS Loops · guest

Guest practice: this set is not saved and does not count.

Question 1 of 5 from: JS Loops

What does this log?

let i = 5;
for (i = 0; i < 10; i++) {
  // some code
}
console.log(i);
Question 2 of 5 from: JS Loop while

A do...while loop always runs its body at least once.

Question 3 of 5 from: JS Break

What does this log?

for (let row = 1; row <= 2; row++) {
  for (let col = 1; col <= 3; col++) {
    if (col === 2) break;
    console.log(row + "," + col);
  }
}
Question 4 of 5 from: JS Break

A break inside a switch that sits inside a loop ends the loop.

Question 5 of 5 from: JS Continue

In a for loop, the change step (like i++) still runs after a continue.

Ready to submit?

Click a question to go back and check it. After you submit, you will see the right answer and an explanation for every question. As a guest, nothing is saved.