did you know that ternary operations do not impact legibility at all?
This commit is contained in:
parent
02082c863d
commit
3de5270e00
2 changed files with 2 additions and 0 deletions
2
leap-year/leap.js
Normal file
2
leap-year/leap.js
Normal 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;}
|
Reference in a new issue