Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

do while loop javascript

//Joke: A programmers wife tells him: "While you're at the store, get some milk.
//...He never comes back...

var endOfCondition = 1;
var someCondition = true;

while(someCondition === true){  
  console.log("Executing code " + endOfCondition + " times.")  
  if(endOfCondition == 20)
  	{
      someCondition = false;        
  	} 
   endOfCondition++;
   console.log(endOfCondition - 1)
}
 
PREVIOUS NEXT
Tagged: #loop #javascript
ADD COMMENT
Topic
Name
7+7 =