Write a JavaScript program to determine whether a given year is a leap year in the Gregorian calendar. 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.");
}
}