odin-javascript-exercises/06_leapYears/solution/leapYears-solution.js

6 lines
135 B
JavaScript
Raw Permalink Normal View History

2022-02-20 11:07:44 -08:00
const leapYears = function (year) {
2023-01-21 09:53:41 -08:00
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
2022-02-20 11:07:44 -08:00
};
module.exports = leapYears;