Error on "Debugging: Catch Use of Assignment Operator Instead of Equality Operator"

Hi, excuse me, I belive that should be “==”, in advance thanks.

if (x = y) is showing an example incorrect code. So if (x = y) is not incorrect, it’s just illustrating the potential mistake.

If you read the comments, it describes how the code is broken. The instructions are then to “fix the condition so the program runs the right branch”.

Changing the = to == is the whole point of the exercise.

Remember: this is the Debugging section of the curriculum.