Use the Conditional (Ternary) Operator test not passed

Tell us what’s happening:

Your code so far


function checkEqual(a, b) {
  return a === b ? "True" : "False";

}

checkEqual(1, 2);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:62.0) Gecko/20100101 Firefox/62.0.

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

Your function returns the strings “True” or “False”. The challenge instructions state the function should return the actual Boolean values true or false.

1 Like