From 3de5270e00fdd1e9ebadcde353827dd52fc1a62c Mon Sep 17 00:00:00 2001 From: Moritz Poldrack Date: Wed, 14 Apr 2021 08:35:20 +0200 Subject: [PATCH] did you know that ternary operations do not impact legibility at all? --- leap-year/leap.js | 2 ++ ly.c => leap-year/ly.c | 0 2 files changed, 2 insertions(+) create mode 100644 leap-year/leap.js rename ly.c => leap-year/ly.c (100%) 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;} diff --git a/ly.c b/leap-year/ly.c similarity index 100% rename from ly.c rename to leap-year/ly.c