It doesnt seems to work


#1

console.log("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'");
console.log("Suddenly, Bieber stops and says, 'Who wants to race me?'");
var userAnswer = prompt("Do you want to race Bieber on stage?");
if (userAnswer==="yes")
{
console.log("You and Bieber start racing. It's neck and neck! You win by a shoelace!");
}
else
{
console.log("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing");
}

its says that didd you add if statement to your code?


#2

Your missing a variable on the other end of = prompt(...) probably userAnswer. Also using = in a condition is a bad idea as it is an assignment operator better use == (which compares values) or === (which compares values and types). Last but not least formatting your code makes it better readable for you and others.


www.jsbeautifier.org


#3

Maybe you forgot to add or include your previous code.

Try to add this on the top

var age = prompt("Whats your age?");

if (age < 13){
    console.log("You are allowed to play BUT I dont take the responsibility");
    }

else{
    console.log("You can do it!");
    }

#4

I have problem whit this

ty.


#5

There's a space between Suddenly, and Bieber

you have Suddenly,Bieber

should be

Suddenly, Bieber


#6

ty man yeah i miss there and at says,'who wants