Order of operations causes (0 < 5 < 3)
to be interpreted in javascript as ((0 < 5) < 3)
which produces (true < 3)
and true is counted as 1, causing it to return true.(操作顺序导致(0 < 5 < 3)
在javascript中被解释为((0 < 5) < 3)
其产生(true < 3)
并且true被计为1,从而使其返回true。)
This is also why (0 < 5 < 1)
returns false, (0 < 5)
returns true, which is interpreted as 1
, resulting in (1 < 1)
.(这也是为什么(0 < 5 < 1)
返回false, (0 < 5)
返回true,这被解释为1
,导致(1 < 1)
。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…