JS中对&&的解释是:https://developer.mozilla.org/en/JavaScript/Reference/Operators/Logical_Operators
expr1&&expr2:Returns
expr1if it can be converted to false; otherwise, returnsexpr2. Thus, when used with Boolean values,&&returns true if both operands are true; otherwise, returns false.
意思是说,如果expr1可以被转换为false就返回expr1,否则返回expr2,除非&&两边都是bool值,这是两边同为true才返回true,否则返回false。
所以 true&&"abc"结果会是"abc"
回复的很全面
它一字是也true也当字符串处理了。