# Build a Leap Year Calculator - Build a Leap Year Calculator

**URL:** <https://forum.freecodecamp.org/t/build-a-leap-year-calculator-build-a-leap-year-calculator/779669>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [February 21, 2026, 9:10pm UTC](https://forum.freecodecamp.org/t/build-a-leap-year-calculator-build-a-leap-year-calculator/779669 "2026-02-21T21:10:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![andriancioban24](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/andriancioban24/32/410626_2.png) [@andriancioban24](https://forum.freecodecamp.org/u/andriancioban24)\
**Post date:** [February 21, 2026, 9:10pm UTC](https://forum.freecodecamp.org/t/build-a-leap-year-calculator-build-a-leap-year-calculator/779669/1 "2026-02-21T21:10:51Z")

</div>

### Tell us what’s happening:

Why the hell is this not correct? Steps 5,6,7 are apparently incorrect even though I’ve tested the code myself.

### Your code so far

```js
let year = 2000;

function isLeapYear(year) {
  if ((year % 4 === 0 && year % 100 !== 0) || (year % 400 === 0)) {
    return `${year} is a leap year`;
  } else {
    return `${year} is not a leap year`;
  }
}

let result = isLeapYear(year)
console.log(result); // "2000 is a leap year"

```

### Your browser information:

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36`

### Challenge Information:

Build a Leap Year Calculator - Build a Leap Year Calculator

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/javascript-v9/lab-leap-year-calculator/build-a-leap-year-calculator)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![dhess](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dhess/32/406235_2.png) [@dhess](https://forum.freecodecamp.org/u/dhess)\
**Post date:** [February 21, 2026, 9:21pm UTC](https://forum.freecodecamp.org/t/build-a-leap-year-calculator-build-a-leap-year-calculator/779669/2 "2026-02-21T21:21:44Z")

</div>

Welcome to the forum @andriancioban24 !

I understand your frustration…and you’re really going to do a face palm when you see what the issue is.

The messages you return must be exact to pass the tests…including punctuation, or lack thereof.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [March 21, 2026, 9:22pm UTC](https://forum.freecodecamp.org/t/build-a-leap-year-calculator-build-a-leap-year-calculator/779669/3 "2026-03-21T21:22:42Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
