Use the Conditional (Ternary) Operator1

Tell us what’s happening:
what is wrong?

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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36 Avast/69.0.792.82.

Link to the challenge:

Hint: Your function is not comparing values a and b.

you mean that it should be a==b right?


what @wawraf said is true.

you need to read more about “JavaScript Comparison and Logical Operators”

1 Like

I am having the same problem, it won’t let me pass the challenge and my first instinct about the comparison should be == as well. But still not answering the question, how can I move on to the next curriculum? is there any bypass or report of bug in the system?

You don’t must do any challenges, use the menu in the upper right corner Togo anywhere in the curriculum

But, if you want help with your code you would need to post it - if you use the “Ask for help” button most of the work in creating a post and sharing your code will be done automatically