Lesson 2


#1

The console doesn't tell anything is wrong, that means that the code is alright, but when I enter my age and press OK, the pop-up box tells me: "Oops, try again. It looks like you didn't check for the user's age" Here's my code:

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

if (age < 6)
{
console.log("You are too young to play.")
}
else
{
console.log("You are old enough to play!")}

What's the problem?


#2

I tried refreshing, it didn't work. :frowning:


#3

You should really be including semicolon's after your statements, it's proper practice.