In JavaScript, how can I conditionally assign value to object with destructuring and short circuit evaluation?

Let’s say I have this set up: const objA = { name: "Jacob", email: "jacob@email.com" }; const objB = { lastName: "Smith" }; Why can I do this: const lastName = objA.lastName || objB.lastName; But not this? const { lastName } = objA || objB; Was able to re-create above example in dev tools. My… Read More In JavaScript, how can I conditionally assign value to object with destructuring and short circuit evaluation?