Tell us what’s happening:
Why the hell is this not correct? Steps 5,6,7 are apparently incorrect even though I’ve tested the code myself.
Your code so far
let year = 2000;
function isLeapYear(year) {
if ((year % 4 === 0 && year % 100 !== 0) || (year % 400 === 0)) {
return `${year} is a leap year`;
} else {
return `${year} is not a leap year`;
}
}
let result = isLeapYear(year)
console.log(result); // "2000 is a leap year"
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36
Challenge Information:
Build a Leap Year Calculator - Build a Leap Year Calculator