
Quan Nguyen
2,250 PointsI got this Bummer in the Code Challange: "Did you include the boolean expression to evaluate?"
Im not sure what is wrong with my Code.
int value = -1;
string textColor = null;
(value < 0) ? textColor = "red" : textColor = "green";
1 Answer

Luis Duenas
5,964 PointsThat's not how the ternary operator works, it returns a value and you need to assign that returned value to your variable.
Try this `textColor = value < 0 ? "red" : "green";
, that should work.
Quan Nguyen
2,250 PointsQuan Nguyen
2,250 PointsYeah I figured, thank you so much!