![]() |
Programming JavaScript . while |
|
|
||||||||||||||||||||
|
while looping is used to make sure the statements
within the loop are executed only if the condition is true. |
|||||||||||||||||||
|
while(condition) |
|||||||||||||||||||
|
myVariable=0; // make sure you start with an initialized myVariable while (myVariable
< 10) //
use the proper comparision operator (see below)
|
|||||||||||||||||||
|
execute some statements 3 times lastNumber = 4;
|
|||||||||||||||||||