3. Adding some code. Syntax Error


#1

Here is my code:

// Check if the user is ready to play!
{
confirm("Let's play!")
}

var age = prompt("What's your age");

if( age < 13)
{
console.log("Let us begin! Developer claims no responsibility for user's experience");
}
else
{
console.log("Let us begin! Enjoy!");
}

console.log{"You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'")

I click on submit and I get this:
SyntaxError: Unexpected token {


#2

Hi try to remove the { } around confirm


#3

Just after your comment (//Check if the user is ready to play!) to got this {confirm("Let's play!")} change it to this confirm("Let's play!")

as you can see, without { } :slightly_smiling:


#4

Thanks. I picked that habit up because the previous exercises let me submit with the confirm wrapped with curly brackets.


#5

Got rid of the curly brackets, still getting the same error


#6

Try Post your new code


#7

I figured out what was wrong.