While learning more about IE’s documentMode property, I came across some sniffing code, which, of cause, fails in browsers like Firefox.
However, a simplified version of the test would readas such:
if(undefined < 9) planA();
else planB();
Now in Firefox, it fall through to planB(), but so does this:
if(undefined > 9) planA(); // note: greater than
else planB();
The question is, is this the documented behaviour? That is, does the undefined value short-circuit the test?
undefined
is neither smaller nor greater than 9. Why would it be? – Kilian Foth Jul 12 at 10:43