Asking for feedback 6 .....it shows Oops, try again. There was a problem with your syntax


#1

confirm("I'm ready to go!");
var age = prompt("what is your age");
if(age < 13)
{
console.log("You allow to play but you take no responsibility");
}
else{
console.log("You can play");
}
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.'");
var feedback = prompt("the user to rate your game out of 10");
if (feedback > 8)
{
console.log("Thank you! We should race at the next concert!");
}
else {
console.log("I'll keep practicing coding and racing.");
}


#2

Try refreshing.:smiley:


#3

I did,Not useful,It shows
Oops, try again. There was a problem with your syntax.

what's wrong?


#4

I tweaked your code a little, and found that "unexpected input" came out. So all I did was put another bracket at the end. And I was like, 'I knew that' when it was able to function.:smiley:

SO PROBLEM-

BRACKET MUST BE ADDED AT END

Hope it helped!:smiley:


#5

which BRACKET ?I think I have bracket.I can't find it lol


#6

No, I mean at the end of the code.


#7

Hi,It work now,I didn't add "}"
why useAnswer === "yes" yes have to add " "?


#8

Because "yes" is an answer that must come from the prompt. Also, "yes" does not make a function in JS language.


#9

Thanks Is yes belong to string?