To learn it you gotta 'Do' it. NEED HELP


javaScript lesson 7: to learn it you gotta 'do' it.

Am I doing something wrong? I dont get this!

var Runner = true
var getToDaChoppa = function(){
    do {
        console.log("Doing Doing Doing!");
    };while(runner === 1);{ 
        console.log("I'm looping!");
        Runner = false;



a do while loop:

do {
  // do something
} while (condition)

while loop:

  // do something

now, you can not combine a do while and a while loop into a do while while loop (what you did)

also, be careful where to place semi-colons


Ok i will try that. I am confused on the whole semi-colen thing.


just leave out the semi-colons for do while and while loop, not important, that will come later


I'm still getting a problem! It wont work! Here is my syntax,

var runner = true
var getToDaChoppa = function(){
do {
console.log("Do/ while loops are really hard" + runner + "!");
}while(runnner = true);




Nevermind! I got it to work I just misspelled something... lol whoops


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