Leap year program in javascript

In this tutorial, we are going to share a leap year program in javascript with the output. The leap year is also known as an intercalary year or bissextile year. It is a calendar year containing one additional day in February month.

Leap Year Algorithm

1. if (year is not divisible by 4) then (it is a common year)
2. else if (year is not divisible by 100) then (it is a leap year)
3. else if (year is not divisible by 400) then (it is a common year)
4. else (it is a leap year)

Leap year program flowchart

leap year program in javascript

Leap year program in javascript

Below is javascript program to check leap year with the output.

Leap year program in javascript in console

Below program will print leap year on the console.

Program Output

true

Recommended Posts:


Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of FreeWebMentor.com (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Solved Programs