Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/TheAlgorithms/JavaScript
/ isLeapYear
Function
isLeapYear
Maths/LeapYear.js:16–18 ·
view source on GitHub ↗
(year)
Source
from the content-addressed store, hash-verified
14
* @returns {boolean} true
if
this is a leap year, false otherwise.
15
*/
16
export
const
isLeapYear = (year) => {
17
return
year % 400 === 0 || (year % 100 !== 0 && year % 4 === 0)
18
}
Callers
6
DateToDay
Function · 0.90
getDayDiff
Method · 0.90
generateMonthCal
Method · 0.90
LeapYear.test.js
File · 0.90
problem19
Function · 0.90
getMonthDays
Function · 0.90
Calls
no outgoing calls
Tested by
no test coverage detected