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

Monday, December 3, 2012

Codecademy: Codeyear Using if else statements within functions


//sample solution


var legalDrivingAge = 18;
var canIDrive = function(myAge){
if(myAge >= legalDrivingAge){
return true;
} else {
return false;
}
};

canIDrive(19);

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts