Skip to content

Instantly share code, notes, and snippets.

@aarohmankad
Created February 28, 2015 03:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aarohmankad/e3abe2e7e5707dd9ff51 to your computer and use it in GitHub Desktop.
Save aarohmankad/e3abe2e7e5707dd9ff51 to your computer and use it in GitHub Desktop.
function isEven(number){
// if number modulo 2 is 0, it means that the number divided by two has no remainder, which means it's even.
// 4 % 2 = 0
// 3 % 2 = 1
if(number % 2 === 0){
return true;
}
else
{
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment