javascript运算符

&& 优先级高于||

1||0&&2
1
(1||0)&&2
2

https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/Operator_Precedence

 

你可能感兴趣的:(javascript运算符)