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

Monday, December 3, 2012

Codecademy: Codeyear Testing one or more conditions


//sample solution


var yourName = "Pam";
var gender = "female";
var result;

if (gender === "male") {
  result = "His name is "+yourName;
} else if (gender === "female") {
  result = "Her name is "+yourName;
} else {
  result = "Hi "+yourName;
}

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts