String comparison value issues

Hi there,

Ive been watching a tutorial video off lynda.com and in the one video she uses:

if (“55” < “100”)

and this equates to false - How does this evaluate to false and on what principle ?

the other example is :

if (“10” < “100”)

and this equates to true, again I cannot work out why

Ive tried numerous attempts to try and work this out, but Ive not been very successful, any help or a kick up the ar*e in the right direction will be greatly appreciated.

Ben

That’s really weird…

Likewise, this equate to true: if(“the” > “cow”){ …

and this equates to false: if(“cow” > “the”){ …

how odd

But if you try

if(“cow” > “bee”) evaluates to true

But

if(“cow” > “dog” evaluates to false

More help kind people :slight_smile: