javascript - JS Codecademy exercise NS_ERROR_NOT_AVAILABLE: -
i coding newbie. learning js on codecademy , keep getting error : ns_error_not_available
. doing wrong in following code?
prompt ("are ready play"); confirm ("i ready play!"); var age = prompt("what's age"); if("age" <= 12) { console.log("play @ own risk"); } else { console.log("play on!"); }
age
variable, not string, there no need quotes:
prompt ("are ready play"); confirm ("i ready play!"); var age = prompt("what's age"); if(age <= 12) { console.log("play @ own risk"); } else { console.log("play on!"); }
Comments
Post a Comment