do ... while in javascript

     The do...while statement creates a loop that executes a specified statement until the test condition evaluates to false. The condition is evaluated after executing the statement, resulting in the specified statement executing at least once.
     In the following example program the do...while execute at least once.

Syntax

do
{
   statements; 
} while(condition);


Flow chart:
 
Example

var a = 0;
do {
  a = a + 1;
  alert(a);
} while (a < 3);



Example Program:- (Editor)


Editor is Loading...

Advertisement




Tags:
Do while in allinworld99, do while flow chart in allinworld99, javascript do... while in allinworld99.

Nhận xét

Bài đăng phổ biến từ blog này

How to set the SDK, NDK and JDK path to android studio?

if statement

Select all values from list box in a single click using javascript