Monday 6 September 2010

JavaScript isEven(value)

Nice easy function to tell if a number is even:

function isEven(value){
  return value % 2 == 0;
}

No comments:

Post a Comment