Unit 5 Lesson 8 Level 4 Line 8



In line 8 it says (“Julio” > firstName) which evaluates to false. The instructions direct students to change only the operator to make the statement evaluate to true. The solution is the change the greater than to a less than. Can someone explain why this makes the statement true?


Possibly because J is “less than” M in the alphabet? I seem to recall that that’s how alpha-strings are compared. Someone else please confirm. Thanks for asking this question.


@christinarconnor is correct. Here is a good explanation:


Thank you! Did I miss this in the lesson somewhere?


If you did, I did too! I tested Nick > firstName which came back true and I wanted more of an explanation so I searched it up.