10.to learn it, you gotta 'do' it


#1

var joker=false;

var getToDaChoppa = function() {
do {
console.log("We should get "+ joker
+"time")
};
while(joker) {
console.log ("Get Da joker!")

};

getToDaChoppa();

it saying syntax err.
Please point out the err


#2

There is a semicolon disrupting your do/while loop. You are also missing a closing brace for your function.


#3

var getToDaChoppa = function()
{
do
{
console.log("We should get "+ joker +"time")
};
while(joker)
{
console.log ("Get Da joker!")
};
};

getToDaChoppa();

m still getting syntax err...


#4

Check my comment, the semicolon to remove comes right before your while loop. I see you added a closing curly brace at the end to close the function. That's good. However, I hope you kept the var joker = false before your function code.


#5

var joker = false;
var getToDaChoppa = function()
{

do {
console.log("We should get "+ joker +"time") 
}

    while(joker){
    console.log ("Get Da joker!");
    }

}

getToDaChoppa();

As biff75 said, You never closed your comment! "console.log("Get Da Joker") " is wrong since it is missing a ";" at the end!


#6

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