javascript object key conditional code example Example: js conditional key const object = { ...bool && { foo: 2 }, }