What rules apply for the JavaScript relational comparison operators when the operands are of different types?
For example, how is true > null
evaluated? I can type this into my developer console and it gives the result true
, but why?
I searched for a bit, but didn't find any blog posts explaining this, although there are plenty explaining type coercion for == and === comparison operators.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…