Use the Conditional (Ternary) Operator- help

Use the Conditional (Ternary) Operator- help
0

#1

Tell us what’s happening:
I am stuck and I don’t know what I am doing wrong. :frowning: below is my code. if anybody can help please.

Your code so far
return a = b ? “true” : “false”;

checkEqual(1, 2);


**Your browser information:**

User Agent is: <code>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/604.5.6 (KHTML, like Gecko) Version/11.0.3 Safari/604.5.6</code>.

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

#2

That was very close!

Make sure your true and false booleans are not wrapped in strings. :sunglasses:


#3

Also instead of using = operator to assign. You want to compare with ===.


#4

thank you so much!!!