Help wih #2,syntax error


#1


2

Oops, try again. Did you set the age variable equal to the result of prompting the user?


confirm("Are you ready to play and epic game?");


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

if(age < 13)
{
    console.log("You can play, but I take no responsibility for you.");
    } 

else {
    console.log("Wahoo! You are an old fart, let's play!");
    
}


#2

Does the program behave the way you expect it to? If not, then that difference is what you should be addressing/asking about.

If instead it does run as you expect, then you'll have to explain that you're able to enter an age and have it print either of the two messages based on that age - yet Codecademy isn't accepting your code.

You have to explain what's going on and what you want to know.


#3

It would not pull up the box to enter my age in. Once I ran the code in a different computer it worked. I guess it does not like my laptop. Thank you.


#4

@methodplayer93627,

Maybe....
++++ reset of session *****************
under certain circumstances you can shoot your Browser in an
inconsistent state.

Therefor it is of an advantage to know that you have 2 reset facilities:

One is the use of the F5-key which does a refresh Browser

and

Two, select&copy your code
Then use the Reset Code button of the course-window,
then paste your code back in.

Addendum
General Notes:
Always refresh the browser after making corrections:
CTRL f5 ( if on Windows or Linux)
CMD r ( if on a MAC).
CTRL 0 to reset browser zoom


#5

Thank you! I will try it tonight!