function checkEqual(a, b) {
return a = b ? true:false;
}
checkEqual(1, 2);
I have used
return (a = b ? true : false );
There is information about this if you press, get a hint. I compared code saw tiny differences that shouldn’t affect the outcome, but I still try’ed the code it gave me from it. It didn’t work, am I doing something wrong? Link to the challenge:
learn.freecodecamp.(this is org i just cant put links yet)/javascript-algorithms-and-data-structures/basic-javascript/use-the-conditional-ternary-operator
That is not necessary. It has already been fixed, but the changes have not been moved to production. In fact, the challenge has been changed slightly to return different values than the current production version. You can check out our beta site which has the most updated Guide article for this challenge. We are hoping to have these changes moved to production soon.