如何修复jslint'&&'子表达式应该包含在parens错误中

And*_*rus 4 javascript jslint

我把所有内容放在括号中,但下面的代码仍然在jslint中抛出错误:

Problem at line 5 character 104: The '&&' subexpression should be wrapped in parens.

if ((typeof (c1) === 'string') && (typeof (c2) === 'string') && (c1 !== n...
Run Code Online (Sandbox Code Playgroud)

怎么修 ?

"use strict";

function t() {
    var c1, c2;
    if (((typeof (c1)) === 'string') && ((typeof (c2)) === 'string') && (c1 !== null) && (c2 !== null) && ((c1.trim()) === '') || ((c2.trim()) !== '')) {
        return;
    }
}
Run Code Online (Sandbox Code Playgroud)

mqp*_*mqp 6

它抱怨的形式if(a && b && c || d),因为(我想)这不是显而易见是否&&||将优先考虑.修复它看起来像if(a && b && (c || d))它会停止抱怨.