Created
August 31, 2013 08:50
-
-
Save vipickering/6396994 to your computer and use it in GitHub Desktop.
Javascript: isEven Function
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(num) { | |
if(num !== false && num !== true && !isNaN(num)) { | |
return num % 2 === 0; | |
} else return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment