Created
January 22, 2020 11:58
-
-
Save 19Site/66d5722eae5c177ca627dd00e3f75b0b to your computer and use it in GitHub Desktop.
Check is leap year
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
/** | |
* check year is leap year | |
*/ | |
function isLeapYear(year) { | |
return ((year % 4) === 0 && (year % 100) !== 0) || (year % 400) === 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment