Code a JavaScript function called isLeapYear() that accepts one integer value as its parameter and will return true if this value is a leap year and false if it is not. Rules: A leap year is divisible by four but not divisible by 100 unless it is divisible by 400. E.g. 1600, 1912, 1996, 2000, 2020 and 2124 are leap years where 1000 and 3000 are not

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter6: Sub And Function Procedures
Section: Chapter Questions
Problem 2MQ2
icon
Related questions
Question

Question 16

  1. Code a JavaScript function called isLeapYear() that accepts one integer value as its parameter and will return true if this value is a leap year and false if it is not.

     

    Rules: A leap year is divisible by four but not divisible by 100 unless it is divisible by 400.

     

    E.g. 1600, 1912, 1996, 2000, 2020 and 2124 are leap years where 1000 and 3000 are not

Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Types of Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning