Another one stuck on Justin Bieber! Please help!


#1

Below is my code. The error message says "syntax error". That's all. Thanks in advance!

<confirm("Are you ready to play?");
var age = prompt("What's your age?");
if (age<13)
{
console.log ("You can play but we take no responsibility!")
}
else
{
console.log("Get ready to 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.'")
}
Replace this line with your code.

`


#2

HI this line

If (userAnswer ==="Yes")

you wrote if with teh uppercase I and this line

<confirm("Are you ready to play?");

remove the < before it..


#4

Wow, thank you! My code didn't show the "<" before confirm (don't know how
it got there when I copied/pasted) but I changed the "If" to lower case and
that did the trick. Thanks again!


#5

Here's something interesting. I finished the next exercise, got through it,
got the congrats, was told to submit it (again) and it came back this time
with a syntax error!! Any ideas of how I can move on to the next lesson?


#6

Nevermind. I looked at it again and found that same "if" had changed back
to "If". Thanks anyway!


#7