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

Monday, December 3, 2012

Codecademy: Codeyear Branch and return


//sample solution


var isEven = function (n) {
  if (n % 2 !== 0) {
    return false;
  } else {
    return true;
  }
};

console.log(isEven(1));
console.log(isEven(2));
console.log(isEven(999));

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts