泛舟湖上清波郎朗
只需检查值并使用逻辑或链接条件。const check = (a, b) => a === null || a === '' || b === null || b === '';// the above is the same as this, like the text requests// (a === null || a === '') !== (b === null || b === '') ||// (a === null || a === '') && (b === null || b === ''); console.log([ [null, null], // true [null, ''], // true ['', null], // true ['', ''], // true [1, 1], // false [null, 1], // true [1, null] // true].map(a => check(...a)));