Where is my syntex error?


#1

JavaScript Course: Code your own adventure: step 2: old enough to play

My code is not working. I rewrote it 10 times and checked it over and over. I have restarted the website. I am so confused! Here is my error: SyntaxError: Expected ')'

Can you figure it out?

var age = prompt("What's your age?");
if(age is less than 13)
{
 console.log("Sorry! Come back when you are 13!");   
}
else
{
 console.log("Proceed!");   
}

#2

Use JavaScript Comparison and Logical Operators < instead of the word itself.


#3

Thank you so much Gracie!


#4

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