2
: 1 < 2 < 3
true
: 3 > 2 > 1
false
...
...
: 3 > 2 && 2 > 1
true

Maybe I'm really over thinking things, but I would assume that they'd both evaluate to true. Why does it not?

blakev
  • 4,154
  • 2
  • 32
  • 52
  • 4
    [see this answer](http://stackoverflow.com/questions/5852056/why-does-alert321-alert-false) – Shryme Feb 26 '14 at 21:03
  • Thanks haha ~ I knew it was something simple. This also answers why it would work "sometimes" (when the last case evaluated to `int(1)`) – blakev Feb 26 '14 at 21:05

2 Answers2

13

Because 1 < 2 evaluates as true which is less than 3,
but 3 > 2 which also evaluates as true is NOT greater than 1

Kevin Jantzer
  • 9,215
  • 2
  • 28
  • 52
3

Because 3 > 2 evaluates to true then true > 1 evaluates to 1 > 1 which is false

sabotero
  • 4,265
  • 3
  • 28
  • 43