#2 SyntaxError! But why?


#1

Please, what's wrong w/ this code?...

confirm("Ready to play? Click 'OK' if so.");
var userAge=prompt("How old are you?);
if (userAge<13) {
console.log("Well, you can play if you want, but it's at your own risk. We take NO responsibility.");
}
else { console.log("Play on!");
}

Thx


#2

Ok, so got the code to work, as is...Looks like
1. Copying and pasting code into the text editor is risky; parts of code will be misidentified.
2. It wants you to use the exact terms. Like, you can't use 'userAge' instead of 'age'...

Can someone confirm these conventions?


#3

Yes guys. It's only to do with the paragraph spacing. Annoying I know.
Here it is all;
confirm("Are you ready to play?");
var age = prompt("What's your age?");
if(age<13)
{
console.log('WE TAKE NO RESPONSIBLIY FOR YOU PLAYING THIS GAME');
}
else
{
console.log('This is my first game, so enjoy');
}
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?");