Tell us what’s happening:
Basic JavaScript: Use the Conditional (Ternary) Operator
Your code so far
function checkEqual(a, b) {
return (a = b ? true:false);
}
checkEqual(1, 2);
The result I got from this exercise is:
// running tests
checkEqual(1, 2) should return false
checkEqual(1, -1) should return false
// tests completed
Please help! I can’t find the answer to it.
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/use-the-conditional-ternary-operator