Created
November 26, 2020 18:17
-
-
Save elzodxon/0a9ba14230cd665526c6ec39def051fd 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
const leapYear = year => year % 100 === 0 ? year % 400 === 0 : year % 4 === 0; | |
console.log(leapYear(2016)); | |
console.log(leapYear(2000)); | |
console.log(leapYear(1700)); | |
console.log(leapYear(1800)); | |
console.log(leapYear(100)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment