Age confirm


i just began and i got stuckkk... help!
so this happened on exercise 2

after prompting my age (as excpected)
and the console shows the phrase i wanted (as expected)...
still it doesn't let me through to the next lesson.
Instead it says :

Oops, try again. It looks like you didn't check for the user's age.

here's my code:

confirm ("Let's play and get smart!");

var age = prompt ("How old are you?");

if (age <= 16) {
    console.log ("Let's do this!");
    else {
    console.log ("This is a kid zone, no adults please!");

thanks before!


I think you need to say if the user is less than 13 rather than less or equal to 16.


silly mistake.


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