CodesJava

Easy learning with example program codes

TypeScript do while loop tutorial


The do while loop repeatedly executes a block of statements until a particular condition is true. It first executes a block of statements and then check the condition.

Syntax:

do { 
//Block of statements 
}while(condition);

TypeScript do while loop example:

var num:number=1;  
do{   
console.log(num);
num++;
}  while (num<=10);

Try it:

JS Bin on jsbin.com
 

Please follow and like us:


Copyright © 2019 CodesJava DMCA.com Protection Status SiteMap Reference: Java Wiki