Created
February 28, 2015 03:47
-
-
Save aarohmankad/e3abe2e7e5707dd9ff51 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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