🌈 搜索
📅  最后修改于: 2022-03-11 15:03:22.984000             🧑  作者: Mango
const condition = true const obj = Object.assign({}, condition ? { b: 5 } : null) console.log(obj)