Whats wrong with this code?


Whats wrong with this code? Please help!!!!!

var age = prompt("What's your age?");
if (age is less than 10)
console.log("Sorry, your too young.");
else (age is more than 9)
console.log("Have fun playing!");

Javascript help. Cant figure out what is wrong with this line of coding

Just to make sure you get the answer, I'll link to a post that I made in response to your post on the other topic.

However, this topic is four months old! I'm not sure what Codecademy's current rules about necroposting are (when I asked, when the forum was new, necroposting didn't apply), but just for your own benefit, you should create a new topic instead of posting on another one, so you are most likely to receive help. :wink:


It's kind of an unwritten rule. Some people know it, some don't. For example, a moderator wouldn't revive an old topic like this, but a regular user might.

I am glad someone else cares about this (unwritten) rule besides me though!

Forum Rules