Quotes help make search much faster. Example: "Practice Makes Perfect"

Saturday, December 29, 2012

Codecademy Sample Solution: Projects Finishing the If / Else If...



// Write your code below!
var userAge = parseInt(prompt("Enter you age:"));
if(isNaN(userAge)){
console.log("Your input is not a number.");
} else if(userAge>18) {
console.log("You are of legal age!");
} else {
console.log("You're underaged!");
}

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts