Answers for "write a javascript program to determine whether a given year is a leap year in the gregorian calendar"

2

how to check leap year in javascript

function isLeapYear(year) {
  if (year % 400 === 0) return true;
  if (year % 100 === 0) return false;
  return year % 4 === 0;
}
Posted by: Guest on January-21-2021

Code answers related to "write a javascript program to determine whether a given year is a leap year in the gregorian calendar"

Code answers related to "Javascript"

Browse Popular Code Answers by Language