Build a Leap Year Calculator - Build a Leap Year Calculator

Tell us what’s happening:

Can someone help explain why my code is not submitting

Your code so far

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

    } else {
      return `${year} is not a leap year.`
    }
}
let year = 2000;
let result = isLeapYear(year);
console.log(result);

year = 2024;
result = isLeapYear(year);
console.log(result);

year = 1900;
result = isLeapYear(year);
console.log(result);



Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Mobile Safari/537.36

Challenge Information:

Build a Leap Year Calculator - Build a Leap Year Calculator

If a year is a leap year, it must be divisible by 4 and must not be divisible by one hundred.

However if it is divisible by four hundred, it’s fine.

Edit: Also use the num parameter.

Okay
Let me give it a try.
I will get back to you.

Thank you.
I just solved it.
The issue was not the condition.