conditionally add key to object javascript
const condition = getCondition();
const additionalCondition = getAdditionalCondition();
const person = {
firstName: "Max",
...(condition && { lastName: "" }),
...(additionalCondition && { addition: "" }),
};