Tell us what’s happening:
my code is giving the correct answers however it is not passing the tests…
function isLeapYear (year) {
let result = year % 4 === 0 && !(year % 100 === 0 && year % 400 !== 0)
? year + " is a leap year"
: year + " is not a leap year";
return result;
};
const year = 1900;
console.log(isLeapYear(year));
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36
Challenge Information:
Build a Leap Year Calculator - Build a Leap Year Calculator
https://www.freecodecamp.org/learn/full-stack-developer/lab-leap-year-calculator/build-a-leap-year-calculator