Conditional Object Keys

const age = 18;
let personAbove = {
	name: "John",
	...(age > 20 && { age }),
};
let personBelow = {
	name: "John",
	...(age < 20 && { message: "less than 20" }),
};