Tell us what’s happening:
Hi everyone, can I get some help please?
I am failing whichever tests I do not set the year as. So if I set the year var to 2000 then that passes whilst the other two fail. Individually, every test passes.
Am I meant to declare and iterate across each year?
Your code so far
function isLeapYear (num) {
let remainder = num % 4
if (num % 100 == 0 && num % 400 != 0) {
remainder =+ 1
}
if (remainder != 0) {
return `${year} is not a leap year.`
} else {
return `${year} is a leap year.`
}
}
var year = 1900
var 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/150.0.0.0 Safari/537.36 Edg/150.0.0.0
Challenge Information:
Build a Leap Year Calculator - Build a Leap Year Calculator

