I am sure you need the following :
function t() { var c1, c2; if (typeof c1 === 'string' && typeof c2 === 'string' && c1 !== null && c2 !== null && (c1.trim() === '' || c2.trim() !== '')) { return; } }
Not everyone knows the priority of logical logic, so they want you to wrap c1.trim() || c2.trim() c1.trim() || c2.trim() in parentheses so that they understand how they work.
As a side note, I find it ridiculous that jslint wants spaces between my operators and my operands. I think it is much clearer when there is no place.
source share