The hint has an open curly bracket after the else if conditional. My code does not, yet it still passes as good. When I add the curly bracket, the code errors out.
I could be incorrect as I'm still a beginner myself, but I believe that
return "paper wins";
should not have curly brackets, as else statements do not take conditions. The code is running because ( I think) the last } bracket is closing the entire compare function. I could be completely incorrect though.
say that to the "hint" the codecademy provides
I'd like to contact codecademy directly but there is not indication on
their website on how to contact them . . .
I'm going to risk being told I'm leading the discussion off-topic but I think this link might clarify some issues with curly braces.
thanks for sending this over. very much on topic. My primary concern is
relying on a program that teaches programming that either isn't programmed
properly or not teaching properly by not providing all pertinent info . . .
thanks again for sending this over!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.