Showing posts with label js leap year. Show all posts
Showing posts with label js leap year. Show all posts

Thursday, March 31, 2016

Simple Leap Year Checker in JavaScript

Here is a very simple leaper year checker that I wrote using JavaScipt as my programming language. The code is very ideal for beginners in JavaScript Programming.

If you have some questions please send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.


Program Listing

<html>
<head>
  <title>Simple Leap Year Checker in JavaScript</title>
  <script language = "JavaScript">
    x=1900;
str=x+" is a ";
str1="";
if (x%400==0)
 str1="leap year";
else if (x%4==0 && x%100!=0)
 str1="leap year";
else
 str1="not a leap year";
document.write(str+str1);
  </script>
</head>
</html>