10. To learn it, you gotta 'do' it Infinate Loop?


Have a problem with this being a infinite loop? don't know how??

var ch = true;
var getToDaChoppa = function(){
console.log("get to thee chopa")
      ch = false;



you have two types of while loop, do while:

do {

} while(condition);

and while:

while (condition){


you can not combine a do while and a while loop into a do while while loop like you did


ok, But in a do while loop where does the code go that gets executed in the while loop? don't I need another set of { }??

EDIT: NVM I got it working I understand now, you put it back in the do { }. Thanks



do {

} while(condition);

the content of the do while loop has to between the {}


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.