Problem with syntax

Oops, try again. There was a problem with your syntax.

confirm ("Are you prepared to start your journey?")
var age = prompt("What's your age");
if (age < 13) {
    console.log("you are too young to play")
} else {
    console.log("you may continue your journey")
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"<="no") {
    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.'")

if (userAnswer "yes"<="no") this is the part i am wondering about


Notice it yet? Your missing a bunch of semicolons at the end of your lines of code. Also I would just scan your code to make sure that your if, else/if, and else statements all have opening and closing curly braces.

As for "yes" <= "no", make an else if statement for "no".

Hope this helps and should you get anymore syntax errors on the exercise then just let me know.


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