Tell us what’s happening:
Hello,
If you look at my code the following part returns undefined for some reason, I can’t figure it out year%400 ==0
Your code so far
const year = 1984
function isLeapYear(year) {
if(year%4 == 0 && year%400 ==0){
return `${year} is a leap year`
}
}
const result = isLeapYear(year)
console.log(isLeapYear())
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Challenge Information:
Build a Leap Year Calculator - Build a Leap Year Calculator