const condition = true;const person = { id: 1, name: 'John Doe', ...(condition && { age: 16 }),};. 如果每个操作数的值都为 true ,则 && 操作符 ...
確定! 回上一頁