Conditional Operator

Tell us what’s happening:

function checkEqual(a, b) {
return a = b ? "a is equal" : "b is equal";

checkEqual(1, 2)

this is not a comparison

yes I forgot but i tried a == b, it doesn’t seem to work it out.

what do the failing tests say? what’s the challenge instructions?

if you don’t tell us what you need to do, we can’t know

checkEqual(1, 2)

should return “Not Equal”

checkEqual(1, 1)

should return “Equal”

checkEqual(1, -1)

should return “Not Equal”

well, legit complaints, those strings are never returned by your function…