Help for Leap-year exercise in javascript

Hello,
I tryed to find the solution to the leap-year exercise. All I get correct is 5/9. The easy one with : return !isleap

//
// This is only a SKELETON file for the 'Leap' exercise. It's been provided as a
// convenience to get you started writing code faster.
//

export const isLeap = () => {
    if (isLeap % 4 == 0){ return isLeap; }
    else if (isLeap % 400 == 0 && isLeap % 100 == 0){ return isLeap; }
  //if (isLeap % 100 == 0){ return isLeap; } 
    else{
      return !isLeap;}
}
  1. The function is supposed to return a Boolean value.
  2. What tests fail? What does the test output say?

Code Run

expect(isLeap(1996)).toBe(true);

Test Failure

Error: expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false

When called with 1996, your code returns false but the tests expect true. Do you understand why?

Well, I think yes. isleap = 1996
then I check if the rest of the division with 4 is equal to 0
if it is the case I return true with isleap.
Is this ok ?

No I don’t understand why .

Oh. My bad. I think the issue is actually that your function isn’t actually returning true like it’s supposed to. Where does your code ever return true?

I think the OP is just confused. They’ve defined a function expression called isLeap that has no parameters, as indicated by the empty ().

Ok I understood my mistake.
Thanks :+1: