0
in do - while loop
what does it mean : while(true) , while(false) in do - while loop??
3 Answers
+ 1
It's trying to say that whilst a condition is true, the code will repeat over and over again until the condition is false. Example:
3 <10 =true
that's because 3 is less than 10
so....
while(3 <10){
//The code in here will run over and over until the //condition in the while loop (3 <10) is false.
document.write ("Hello World!!!");
}
Hope it helped :)
+ 1
What Cocoa said.
BUT! A do while loop ALWAYS runs once.
0
while(true) in do-while loop, doesn't stop until a break statement! but while(false) in do-while loop, runs only for once...