+ 1
"Once it evaluates to False, the next section of code is executed".What does that mean?
while Loops A while statement is similar, except that it can be run more than once. The statements inside it are repeatedly executed, as long as the condition hold's. Once it evaluates to False, the next section of code is executed???? â¶ïž Help?âïž
5 Answers
+ 4
That means when once the condition of the loop becomes False, the while loop immediatly stops, and is never run again. The interpreter moves to the next line.
+ 3
var i = 1;
while(i < 10) {
i++; // statement in loop body
}
// This is what they meant by
// next section of the code
console.log(i)
+ 2
Ok thank you very much.đ
+ 1
Thanks. This example really helped me.