Build a Leap Year Calculator - Build a Leap Year Calculator

Tell us what’s happening:

I keep getting this errror and ive tried everything
10. You should store the result of calling the isLeapYear function in a variable named result.

Your code so far

let year = 2000
function isLeapYear(year) {
  if ((year % 4 === 0 && year % 100 !== 0) || year % 400 === 0) {
    return `${year} is a leap year.`;
  } 
    return `${year} is not a leap year.`;
  
}
const result = isLeapYear(200);
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/133.0.0.0 Safari/537.36 OPR/118.0.0.0 (Edition std-2)

Challenge Information:

Build a Leap Year Calculator - Build a Leap Year Calculator

Hi. Instruction 2 says to create a variable year to store the value you want to check. Why are you putting values in your function call in the result variable?

nvm im stupid lol thank you

1 Like