if (variable1 !== null || variable1 !== undefined || variable1 !== '') { let variable2 = variable1; } // 简写 const variable2 = variable1 || 'new'