while loop in javascript

     The while statement creates a loop that executes a specified statement as long as the test condition evaluates to true. The condition is evaluated before executing the statement.

Syntax

while (condition)

{

  statements;

}

Example

 var i=0;

  while(i<5)

  {

    alert(i);

    i++;

  }



while Flow Chart



Example Program:- (Editor)


Editor is Loading...

Advertisement




Tags:
while in allinworld99, javascript while in allinworld99, while syntax in allinworld99, while example in allinworld99, while loop in allinworld99, while example program in allinworld99

0 nhận xét:

Đăng nhận xét