Build a Leap Year Calculator - Build a Leap Year Calculator

Tell us what’s happening:

I am not sure why my challenge is not passing as I am getting correct answers with various year values. The year values I have tried are: 4, 100, 160, 400, 1900, 1997, 2000, 2004, 2005, 1997, 2024,

Your code so far

let year = 2000;

function isLeapYear(year){
  if ((year % 4) === 0 && (year % 400) === 0) {
    return `${year} is a leap year`;
  } else if ((year % 4) === 0 && (year % 100) > 0) {
    return `${year} is a leap year`
  } else {return `${year} is not a leap year`}
}

let result = isLeapYear(year);

console.log(result);





Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36

Challenge Information:

Build a Leap Year Calculator - Build a Leap Year Calculator

Double check, your output messages are missing something

Haha that was superquick, thank you for the assist. Silly error. For those reading in future, I missed the " . " at the end of each output message.