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

Monday, December 3, 2012

Codecademy: Codeyear Nested Conditionals: Part 1


//sample solution

var cost = 1000;
var employed = "yes";
var result;

if (cost > 100) {
  if (employed === "yes") {
  result = "buy";
  } else {
  result = "can't afford";
  }
}
else {
  result = "reject cheap product";
}

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts