Hello,
I discovered a bug in the solution guide of excercise: Basic JavaScript: Use the Conditional (Ternary) Operator. The solution guide can be found here: (unfortunately i can’t post links yet. You can find the guide by clicking: “Get a hint” inside excersice: Basic JavaScript: Use the Conditional (Ternary) Operator.
Solution (wrong):
function checkEqual(a, b) {
return (a = b ? true : false );
}
checkEqual(1, 2);
Solution (correct):
function checkEqual(a, b) {
return (a === b ? true : false );
}
checkEqual(1, 2);
Why:
b should not be assigned to a. b should be checked if its equal to a.