#12 JavaScript Tutorial | While loop

Veröffentlicht am: 26 Oktober 2018
auf dem Kanal: Telusko
126,544
1.3k

A while loop is a control flow statement that allows code to be executed repeatedly based on a given Boolean condition. The while loop can be thought of as a repeating if statement. Once the expression becomes false, the loop terminates.
The while loop is primarily used when the number of iterations in not known in advanced and the iterations are based on some boolean condition.
Syntax –
1
2
3
4
while (boolean condition)
{
loop statements...
}
While loop starts with the checking of condition. If it evaluated to true, then the loop body statements are executed otherwise first statement following the loop is executed. For this reason it is also called Entry control loop
Once the condition is evaluated to true, the statements in the loop body are executed. Normally the statements contain an update value for the variable being processed for the next iteration.
When the condition becomes false, the loop terminates which marks the end of its life cycle
For Program code, info & more resources checkout this article - https://simplesnippets.tech/while-loo...
Video by - Tanmay Sakpal
Simple Snippets Channel link -    / simplesnippets  


Auf dieser Seite können Sie das Online-Video #12 JavaScript Tutorial | While loop mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Telusko 26 Oktober 2018 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 126,544 Mal angesehen und es wurde von 1.3 tausend den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!