Tests not passing, my code the same as in the solution

Hi,

I cannot pass the tests on "Use de conditional (ternary) operator. The code looks OK. Tests with console.log are OK.

My code:
function checkEqual(a, b) {

return a === b ? “Equal” : “Not equal”;

}

console.log(checkEqual(1, 1));

The challenge: https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/use-the-conditional-ternary-operator

NB: it is the second challenge in my curriculum not passing the tests.

You have a typing error, it should be “Not Equal”, with a capital E, the challenges are case sensitive

1 Like

@lucianomangiaterra is correct.

It works indeed. Thanks!