mirror of
https://github.com/10h30/odin-javascript-exercises.git
synced 2026-07-11 18:55:59 +09:00
Complete 6
This commit is contained in:
@@ -1,5 +1,18 @@
|
||||
const leapYears = function() {
|
||||
|
||||
const leapYears = function(year) {
|
||||
if (year%4 === 0 ) {
|
||||
if (year % 100 === 0) {
|
||||
if (year % 400 === 0) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false
|
||||
}
|
||||
};
|
||||
|
||||
// Do not edit below this line
|
||||
|
||||
Reference in New Issue
Block a user