QuestenaՎարժանք, որը ցույց է տալիս՝ ինչ կրկնել հաջորդիվ
Հարց 104

An unlabeled break executes inside the inner loop of two nested loops. What is its immediate control-flow effect?

  1. Only the rest of the current iteration is skipped
  2. Both loops always terminate
  3. The outer loop terminates while the inner loop continues
  4. The inner loop terminatesՃիշտ պատասխան

Բացատրություն

An unlabeled break exits the nearest enclosing loop, which is the inner loop in this scenario. It does not merely skip one iteration, and it does not exit every enclosing loop unless a valid label explicitly targets another statement.

Շարունակեք այս թեստով

Սկսել վարժանքը
Հարց 104: An unlabeled break executes inside the inner loop of two… · JavaScript Fundamentals · Questena