Last active
October 9, 2016 19:04
-
-
Save esayler/641d972ec71436cdd02d90320d206c0d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var Year = function(input) { | |
this.input = input; | |
}; | |
Year.prototype.isLeap = function() { | |
if (this.input % 4 === 0) { | |
if (this.input % 100 === 0) { | |
if (this.input % 400 === 0) { | |
return true; | |
} else { | |
return false; | |
} | |
} else { | |
return true; | |
} | |
} else { | |
return false; | |
} | |
}; | |
module.exports = Year; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment