Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

do while loop javascript

//First, declare a variable for initial value
const doWhile = 10;
//Second, get do-while and write what to execute inside do bracket.
//Then, write ++/-- according to your condition.
//Lastly, inside while bracket write your condition to apply.
do{
	console.log(doWhile)
  	doWhile--
}while(doWhile >= 0)
Source by medium.com #
 
PREVIOUS NEXT
Tagged: #loop #javascript
ADD COMMENT
Topic
Name
9+9 =