It looks like you didn't print the introduction


#1

Lesson 1 Part 3

I was under the impression that I had input the introduction correctly, yet I keep managing the get the same error. Any help would be greatly appreciated!


// Check if the user is ready to play!
confirm("Are you ready to play?")
var age = prompt("What's your age?")

;

if(age < 13)

{
    console.log("Sorry, you're too young to play this game.")
    }

else

{
    console.log("Let's get started.")
    
    }

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


#2

This line should be the end of the if statement, Add a closing brace.


#3

I thought so, but then I get a new error.

SyntaxError: expected expression, got '}'


#4

Remove the brace from the end of the next line.


#5

It then gives me the initial error about the incorrect introduction. Thanks for the help btw. I updated the code if it helps.


#6

For your own sake, and for the sake of your readers, always give braces their own line.

if ( ... )
{
    console.log(" ... ");
}
//or
if ( ... ) {
    console.log(" ... ");
}

This way it is much easier to see where they all are.

What error message are you getting? Can you post a link to the exercise, please?


#7

Good to know. Updating now.

Not entirely sure how to properly link so i hope this helps.

Oops, try again.
It looks like you didn't print the introduction.


#8

Misspelled name could be the issue. Copy the exact text from the instructions.


#9

Son of a.. lol thanks so much for assistance. Have a great day!


#10

You're welcome. And you, too.. Happy coding!


#11

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