aboutsummaryrefslogtreecommitdiff
path: root/leap-year/leap.js
diff options
context:
space:
mode:
authorAnthony Wang2021-04-14 07:38:18 -0500
committerGitHub2021-04-14 07:38:18 -0500
commit53f937f6d22dafa477c19981b7b7d07fe11028a5 (patch)
tree45c563f70d55b48d09d7c9d12eb648aa7fe48112 /leap-year/leap.js
parent02082c863dc7912b93013545bd7a2c194691167b (diff)
parent3de5270e00fdd1e9ebadcde353827dd52fc1a62c (diff)
Merge pull request #1 from poldi1405/main
added my leap year solution and allowed for more
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;}