Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
github-classroom[bot] authored Apr 18, 2024
0 parents commit 4b3fdfa
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Leap Year
## Task

`This task can be found on Exercism`
Given a year, report if it is a leap year.

The tricky thing here is that a leap year in the Gregorian calendar occurs:

on every year that is evenly divisible by 4
except every year that is evenly divisible by 100
unless the year is also evenly divisible by 400

For example, 1997 is not a leap year, but 1996 is. 1900 is not a leap year, but 2000 is.

14 changes: 14 additions & 0 deletions leap-year.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
isLeapYear(){

// Write code here

}



// DONT CHANGE. THIS IS FOR TESTING
let years = [ 2015, 1970, 1996, 1960, 2100, 1900, 2000, 2400, 1800]

for (let year of years) {
console.log(isLeapYear(year)
}

0 comments on commit 4b3fdfa

Please sign in to comment.