Build a Leap Year Calculator - Build a Leap Year Calculator

Tell us what’s happening:

I feel like my code is working fine, but for some reason it’s not passing on the 5,6,7,8 tests. this is my code:

Your code so far

const year = 1900;
function isLeapYear(num){
  return (num % 4 === 0 && num % 100 !== 0) || num % 400 === 0 ? `${num} is a leap year`: `${num} 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/155.0.0.0 Safari/537.36

Challenge Information:

Build a Leap Year Calculator - Build a Leap Year Calculator

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/lab-leap-year-calculator/66c06fad3475cd92421b9ac2.md at main · freeCodeCamp/freeCodeCamp · GitHub

Welcome to the forum @igorjaime,

Please check the messages you are asked to return. Are you missing punctuation?

Happy coding