aboutsummaryrefslogtreecommitdiff
path: root/leap-year/leap.js
diff options
context:
space:
mode:
Diffstat (limited to 'leap-year/leap.js')
-rw-r--r--leap-year/leap.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/leap-year/leap.js b/leap-year/leap.js
new file mode 100644
index 0000000..bc3ee67
--- /dev/null
+++ b/leap-year/leap.js
@@ -0,0 +1,2 @@
+// not very clever, but still a valid solution
+function isLeapYear(a){return a%4!=0?false:a%400==0?true:a%100!=0?true:false;}