Answers for "work out what number day of the year it is and if its leap year using javascript"

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 "work out what number day of the year it is and if its leap year using javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language