Tell us what’s happening:
My code works for all the year values, but I am still unmarked for 5,6 and 7. Can anyone please help me out?
Your code so far
let year = 1997;
function isLeapYear(input){
if(input % 4 === 0 && input % 100 !==0){
return year + " is a leap year";
}else if(input % 4 === 0 && input % 400 === 0){
return year + " is a leap year";
}else return year + " is not a leap year"
};
const 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/144.0.0.0 Safari/537.36
Challenge Information:
Build a Leap Year Calculator - Build a Leap Year Calculator