Skip to content

Commit 91f5241

Browse files
new commit
1 parent 7acba8d commit 91f5241

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

37_itsALeapYear.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const isLeap = (year) => {
2+
// code here
3+
if (year % 4 === 0) {
4+
if (year % 100 === 0) {
5+
if (year % 400 === 0) {
6+
return true;
7+
} else {
8+
return false;
9+
}
10+
} else {
11+
return true;
12+
}
13+
} else {
14+
return false;
15+
}
16+
};

0 commit comments

Comments
 (0)