Open RazvanBugoi opened 4 years ago
function isLeapYear(year) {
if(year % 400 == 0) return true;
if(year % 100 == 0 && year % 4 == 0) return false;
if(year % 4 == 0) {return true} else {return false;}
}
Refactoring cu mai putine if-uri.
https://www.codewars.com/kata/526c7363236867513f0005ca/train/javascript