Why is 5 > 4 > 3 != (5 > 4 && 4 > 3)
true in Javascript?
So annoying!
5 > 4 > 3
is evaluated like (5 > 4) > 3
, then it's true > 3
, which is false
. Look
JavaScript, in the great tradition of most languages that descend from C, does not support relational operator chaining.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With