Learn Form Validation by Building a Calorie Counter - Step77

the code keeps on sayin error !
const surplusOrDeficit = remainingCalories >= 0 ? “Deficit” : “Surplus”;
clearly this is incorrect

The instructions clearly says to check if remainingCalories is less than 0, yet you are checking if that variable is greater than 0
I mean logically you are code is correct, but it does not pass the test that is explicitly set for less than 0 so you have to reverse that comparasion sign and remove the = sign since it clearly says less than 0 not less than or equal to 0
and Do not forget to reverse the strings in the result

1 Like