The order of operators in JavaScript (|| ,&&)
问题 I am reading the source code of Underscore.js, then something confused me: // Its code, check the passed-in parameter obj _.isObject = function(obj) { var type = typeof obj; return type === 'function' || type === 'object' && !!obj; }; I am confused about the operator order of expression. I think the operator precedence in return type === 'function' || type === 'object' && !!obj; will be from left to right ; I mean equal to : return (type === 'function' ) || ( type === 'object' && !!obj); if