Tell us what’s happening:
So I checked and all that is different in the answer is adding parenthesis around the return statement. I understand that that is needed if it is multiple lines but if there is only one line of code the parenthesis are not necessary correct?
Your code so far
function checkEqual(a, b) {
return a = b ? “true” : “false”;
}
checkEqual(1, 2);
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; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/use-the-conditional-ternary-operator