is 2020 a leap year code example

Example 1: 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.");
   }
}

Example 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;
}

Example 3: 2020 new year

DELETE FROM the_year_2020 WHERE name LIKE "%covid%" OR "%coronavirus%"; 

-- You know what... to hell with it. 
DROP TABLE the_year_2020;

Tags:

Sql Example