Section Two


#1


https://www.codecademy.com/en/courses/javascript-beginner-en-x9DnD/0/2?curriculum_id=506324b3a7dffd00020bf661


It says syntax error. Why?


Replace this line with your code. 
var age = prompt("What's your age");
if(age is less than 13) 
{
    console.log("Play on, but I take no responsibility");
}
else 
{
    console.log "Play on!";
}


#2

First, instead of typing:

if(age is less than 13)

you can type:

if(myAge = 13)

More easy and convenient
Second, you have one console.log with brackets and the other has no brackets.
Fix it.


#3

Thank you so much! You really helped me!:blush:


#4

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