Skip to content

Tag: statements

how to make code print Suspended instead of won

Code doesn’t output Suspended but outputs Won when the user inputs true. Can someone help explain what have I done wrong with this code, please? Answer You use = incorrectly. In your example, if(isSuspended = true) {} means: To not assigned but check, you should use == instead. or better: P.S. I think y…