Lesson 2) Old Enough To Play? Syntax Error



I keep getting SyntaxError:Invalid or Unexpected Token for my code. I don't exactly understand what is wrong?

// Check if the user is ready to play!
confirm("I am ready to play!")'

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

if(age < 13){
console.log("sorry too young to play")

   console.log("You can play!")


Your code is mostly fine, you just have text issues or something.
Delete the ' after "I am ready to play! And you should be good. :stuck_out_tongue:


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