O'Reilly logo
  • Ahmed Elgendy thinks this is interesting:

It makes sense for a string to be equal to another string, but how can a string be less than or greater than another string?

A:

A: Good question. What does it mean to say “banana” < “mango”? Well, with strings, you can use alphabetical order to know if one string is less than or greater than another. Because “banana” begins with a “b” and “mango” with an “m”, “banana”...

From

Cover of Head First JavaScript Programming

Note

What does it mean for a string to be less/greater than another string?