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

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -