How to use the while Loop statement of JavaScript
Most people do not understand the knowledge points of this article "how to use JavaScript's while Loop sentence", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "JavaScript while Loop sentence how to use" article.
The loop can execute the block of code all the time as long as the condition is specified as true.
While cycle
The while loop loops through the block of code when the specified condition is true.
Grammar
While (conditional)
{
Code to be executed
}
Example
The loop in this example will continue to run as long as the variable I is less than 5:
Example
While (I)