Which of the following is true about while loops in JavaScript? A. While loops terminate after a fixed number of loops that is pre-determined B. While loops terminate after a fixed number of loops that is determined after the loop executes once. C. While loops run as long as a given boolean condition is true. D. While loops run as long as a given boolean condition is false. E. While loops are known as "forever loops" and never stop until the program is halted by the user.

Respuesta :

Answer:

C. While loops run as long as a given boolean condition is true

Explanation:

A while loop will iterate for an indefinite number of times until the specified condition (there is only one) evaluates to false. At which point your loop will stop and execution flow will resume.

The while loop can be illustrated as shown below;

while (condition) { /* do something until condition is false */ }

The moment the condition is false the while loop will break automatically.

ACCESS MORE