showing results for - "how to check leap year in javascript"
Darryl
02 Mar 2017
1function isLeap(year) {
2   if (year % 4 === 0) {
3      if (year % 100 === 0){
4         if (year % 400 == 0){
5            return ("Leap year.");
6         } else {
7            return ("Not leap year.");
8         }
9      } else {
10         return ("Leap year.");
11      }
12   } else{
13      return ("Not leap year.");
14   }
15}
Ilyana
16 Sep 2017
1function isLeapYear(year) {
2  if (year % 400 === 0) return true;
3  if (year % 100 === 0) return false;
4  return year % 4 === 0;
5}
6
Gabriel
18 Feb 2019
1function isLeapYear(year){
2	if(year % 400 === 0 && year % 4 === 0){
3      return true
4    } else {
5      return false
6    }
7}
queries leading to this page
javascript date is leap yearjavascript check leap year date validationhow to find a year is leap year is not in jsleap year programme in javascripthow to check that a year is leap or not in javascript now consider leap year javascriptjavascript check if given year is leapcalculate leap year javascriptleap year condition in js2020 leap year or notleap year javacript if elseleap year condition in javascriptwhich year is leap year javascriptcheck leap year javascriptjs leap yearis 2100 leap year javascripthow to check given year is leap or not javascriptheck leap year in jshow to know year is leap year jsleapyear in jswrite a function for leap year javascriptjs find out which year is a leap yearhow to check next 5 leap year in javascriptfind leap year by javascriptcheck year is leap year or not in javascriptjavascript code for leap yearconditions for leap year in javascriohow to check the leap year in javascripthow to check next leap year in javascriptis leap year js 27how to check leap year in javascriptleap year javascriptis leap year javascriptjavascript to determine whether a given year is a leap or notjavascript leap year codewrite a js program to check if the entered year is a leap year or not check leap year in jsfind if given year is leapyear javascriptjavascript check leap year dateleap year program in javascriptcheck leapyear function jsleapyear program javascript 2c write a program to check whether this year is a leap year or not jsleap year using javascriptjavascript program to determine whether a given year is a leap yearhow to check if a year is a leap year javascriptfind leap year jsleapyear javascriptleap year function javascriptleap year js codejavascript find leap yearis 2020 a leap yearwrire a js program to check if the entered year is leap year or not in javascriptjavascript is leap year methodjavascript to calculate leap yearhow to cheack leap year jshow to check if a year is a leap year with javascriptis 2100 a leap year check with javascript program leap year jsuse js to determine yeardetect which year it is jsxdate is leap year function javascript check ifhow to find given year is leap year or not in javascript without using functionjavascript check if leap yearnext leap yearleap year formula in javascriptjavascript leapyearhow to check leap year in jsleap year javascript programmjs program to find whether a leap year or notleap year program in jsjavascript check for leap yearjavscript leap yearhow to check if a year is a leap year in javascriptleapyear jsprogram that works out if a given year is leap year javascripthow to find given year is leap year or not without using function in javascriptjs calculate leap yearjavascript find leap year and months of the yearleap year in javascripthow to find given year is leap year or not without using function in javascriptjs check if leap yearleapyear in javascriptleap year program in javascript using reduceleap year check javascriptmath for leap yearcheck if year is leap and date is valid in javascriptjavascript check leap yearcheck leapyear in javascriptcheck leapyear as per julian calender function jscalculate leap year in javascriptcheck if year is leap typescriptprogram to find leap year in javascriptleap year rules javascripttest leap year javascript2021 javascript leap yearwrite a javascript program to find whether a given year is a leap year or not leap year check using if else in javascriptleap year program jsif month is leap year javascriptleap year calculator javascriptjavascript fins if leap yearleap year formula jscheckl leap year jsfind leap year in javascriptfind leap year javascriptleap year javascript functionhow to calculate a leap year in javascriptleap year jshow to calculate leap year in jswrite a javascript program to determine whether a given year is a leap year in the gregorian calendar javascript fin leap yearhow to calculate leap year in javascriptprogram to find an year is leap year jshow to check if leap year jsleap year or not in javascriptjavascript leap year programhow does javascript handle leap year 3fleap year in jsjavascript is a leap yearleap year count jsjavascript function to check leap yearhow do i calculate leap year on jsleap year rules in javascripleap year calculation javascriptisleapyear javascriptjs is leap yearyear leap year or not in jscalculate leap year with input in javascripthow to account for leap year in date ago javascriptwrite a javascript to find leap yearjavascript function for calculating leap year write a javascript program to determine whether a given year is a leap year in the gregorian calendarleap year check in javascript for loopfunction to check leap year jsleap year javascript codecheck if leap year javascripthandle leap years javascripthow to get leap year in range in javascriptif else function for leapyear checker in reactjsjava script leapyearleap year formula javascriptleap year javascript ifleapyarn javascriptleap years jswap in js to check given year is leap yearhow to find leap year in js 27write a javascript program that works out if a given year is a leap yearhow know if a leap yearhow to code a leap year calculator in javascriptis leap year jsjavascript code to check leap yearhow to find leap year in javascriptcheck if year is leap year javascriptwrite a javascript program to check leap yearjavascript leap year es6how to find leap year or not in javascriptleap year function in jsif leap year javascriptwrite a javascript program to check leap yealeap year calculator java script how to find leap year in jswrite a javascript console program to check the given year is a leap year or not how to get whether the current year is leap year or not in javascript 3fcheck leap year in javascriptwrite a program to check leap year in javascriptjavascript is leap yearleap year challenge javascriptleap year condition jscondition for leap year javascriptjs function for leap yearcheck leap year jsjs check if year is leaphow to find given year is leap year or not in javascripthow to know if a year is a leap year jsleap year check in javascriptcreate a js function to determine whether or not a given year is a leap year write a program in react js for leap year checkerleap year javascript exampleleap year javascript programleap yearleapyear javascript functionjavascript program to determine whether a given year is a leap year or not javascript determine leap yearjavascript leep yearjavascript how to know if a year is a leap yearjavascript know if the year is leapjavascript 2100 is a leap yearhow to get if year isleapyear in javascriptleap years javascriptleap year java scriptyear is leap year or not in jsleap year example java scriptcheck leapyear jsleap year prograam in jshow to code a leap years calculator in javascriptfind leap year in javascript using functionhow to find if a year is a leap year javascriptfind a leap year in nodehow to determine leap yeara java script program that checks if a year is leap or nothow to find a leap year in javascriptleap year logic in javascriptleap year calculation in javascriptjavascripte leap yearleap year function in javascriptjavascript check if is leap yearvalidation for leap year in javascriptjavascript leap year functionleap year is jsoutput of leap year in javascriptage is leap year or not in javascriptleap year challenge in javascriptleap year code in javascriptleap year in javascript imagejavascript program to check leap year or notjavascript leap year checkingjs validate date with leap yearleap year program in javascript 5ccondition to check a year js leap or notfunction validate leap years javascriptwhen is a year a leap year javascripthow to find given year is leap year or not in jsjavascript if not leap yearcalculate leap year jshow to find if year is leap2 09write a javascript program to determine whether a given year is a leap yearhow to calculate leapyear in jsjavascript leap yearleap year program in javascript using if elseday js leap yearhow to calculate leap year in javascriprfind leap year in jsleap year code javascripthow to check leap year in javascript