Check my syntax?


// Check if the user is ready to play!
confirm("I am ready to play now!")
var age = prompt("How old are you")
if(age < 13)
{ console.log("You may play but we take no responsibility if you get in trouble")
} else {
console.log("Play on!")
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 userawnser = "Yes"
prompt("Do you want to race Bieber on stage?")

Code your own adventure

Oops, try again. Did you declare a variable called userAnswer?


Check your spelling for var userAnswer = "Yes"


HI and you should store the prompt inside the var userAnswer


I think you need an if/else statement for the last part. I can show you mine if you want.


This line should be 'var userAnswer = "Yes";'. Capitalization and spelling make your variable completely different.Semicolons in JS mark the end of a thought, like periods in english. Apart from on the if/else statements and the comment, every line needs a semicolon.