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