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

A while loop's condition is false at its very first check. How many times does its body run?

  1. Exactly once
  2. Zero timesՃիշտ պատասխան
  3. Until a break statement appears
  4. Infinitely many times

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

A while loop tests its condition before entering the body, so a false initial test permits zero iterations. The claim that the body must run once describes do...while, which places its test after the body.

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

Սկսել վարժանքը
Հարց 98: A while loop's condition is false at its very first check.… · JavaScript Fundamentals · Questena