LearnFrenzy
Sign in Take a free test

Loops · JavaScript Loops MCQ · Question 5

What does continue do? Answer, explanation & discussion

  • MCQ
  • Easy
  • 0 comments
  • Answer explained
  • Moderated community
Question 5 Back to Exercise

What does continue do inside a for loop?

  • A Skips the rest of the current pass and moves to the update expression and the next pass Correct
  • B Leaves the loop
  • C Restarts the loop from the first pass
  • D Pauses the loop
Correct Answer: Option A

In a for loop the update (i++) still runs after continue. In a while loop, make sure the variable is updated before continue, or the loop may never end.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links