QuestenaUn entraînement qui indique quoi revoir ensuite
Question 105

An unlabeled continue statement targets this for loop and executes midway through its body. What happens before the next condition check?

  1. The remaining body is skipped, then the update runsBonne réponse
  2. The loop exits immediately without another condition check
  3. The initializer runs again before the body
  4. The remaining body runs, but the update is skipped

Explication

Continue skips the remaining statements of the current body execution and transfers control to the loop's next-iteration sequence. For a normal for loop, that sequence runs the update before checking the condition again; confusing continue with break would wrongly end the loop.

Continuer avec ce test

Commencer l’entraînement
Question 105: An unlabeled continue statement targets this for loop and… · JavaScript Fundamentals · Questena