On April 15, 2025 at 13:48

Responded to @kasparsd:

Nested Destructuring 📜 ES6 (2015)

const user = { profile: { name: 'Ada' } };
const { profile: { name } } = user;

Same as name = user.profile.name;

And you can rename the variable name to userName:

const { profile: { name: userName } } = user;