passed all tests
This commit is contained in:
parent
12e58788cd
commit
15d07a232b
06_leapYears
|
@ -1,7 +1,12 @@
|
|||
const leapYears = function(year) {
|
||||
|
||||
if (year % 4 == 0) {return true}
|
||||
if (year % 4 != 0) {return false}
|
||||
if (
|
||||
year % 4 == 0
|
||||
&& year % 100 != 0
|
||||
|| year % 400 == 0
|
||||
)
|
||||
return true
|
||||
else return false
|
||||
};
|
||||
|
||||
// Do not edit below this line
|
||||
|
|
Loading…
Reference in New Issue