did you know that ternary operations do not impact legibility at all?

This commit is contained in:
Moritz Poldrack 2021-04-14 08:35:20 +02:00
parent 02082c863d
commit 3de5270e00
No known key found for this signature in database
GPG key ID: 27F176BA13437B7C
2 changed files with 2 additions and 0 deletions

2
leap-year/leap.js Normal file
View file

@ -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;}