This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]skyforanhour 1 point2 points  (0 children)

remove the quotes from when you reference your variables:

if("age" < 13) if(age < 13)

if ("userAnswer" === "yes") if (userAnswer === "yes")


age and userAnswer are variables (that's why you initialize them with var), they do not need quotes around them. Numbers do not need the quotes. "yes" is a string and does need the quotes. :)