Story Heats Up! Syntax Error?


#1

Ok - I've decided that CA wants revenue so they are avoiding helping FREE clients and
jamming lessons with errors. I now have this SYNTAX error and can not find the issue.
HELP! Has anyone seen this one yet? SyntaxError: missing before statement

My code is below. THANK YOU!

// Check if the user is ready to play!
confirm("I understand!");
var age = prompt("What's your age");
if(age < 13)
{
console.log("You will be allowed to play, however we take no responsiblity.");
}
else
{
console.log("Enjoy playing, have Fun and WIN WIN WIN!");
}
{
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
confirm("No I do not want to race Bieber");
var userAnswer === "no"
{
console.log("'Thanks but we'll Go Race Justin Timberlake Instead'");
}


#2

You're missing a ; as the error said. Try putting it at var userAnswer === "no"


#3

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