When i put in the age below 13 it does not give me the your allowed to play but we hold no responsibilities, it says welcome to the dos santos gaming experience. im sure im doing it right but there has to be something wrong, Please help!


#1

confirm("I Am Ready To Play!")
var age = prompt("What's your age")
if ("Age" < 13)
{
console.log ("You're allowed to play, but we do not hold any responsibilities")
}
else
{
console.log("Welcome to the Dos Santos Gaming Experience")
}


#2

@weswes24,

In your IF-condition
you are comparing a string Value "Age"
instead of the variable Age

In must point out the fact that
in Javascript-convention the variable-name starts with a =lowercase= character.
http://javascript.crockford.com/code.html

Reference

google search
== the Book ==
javascript [your question] site:developer.mozilla.org

== discussions / opinions ==
javascript [your question] site:stackoverflow.com

== guidance ==
www.crockford.com
http://javascript.crockford.com/code.html
http://javascript.crockford.com/survey.html
http://stackoverflow.com/questions/9549780/what-does-this-symbol-mean-in-javascript
https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript
www.developer.mozilla.org/en-US/docs/Web/JavaScript/Guide
http://stackoverflow.com/questions/336859/var-functionname-function-vs-function-functionname?rq=1