how to check that a year is leap or not in javascript code example
Example: find leap year javascript
function isLeap(year) {
if (year % 4 === 0) {
if (year % 100 === 0){
if (year % 400 == 0){
return ("Leap year.");
} else {
return ("Not leap year.");
}
} else {
return ("Leap year.");
}
} else{
return ("Not leap year.");
}
}