Answers for "javascript leap year test by new date() w3school"

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 "Javascript"

Browse Popular Code Answers by Language