Codington
0 of 8 problems solved • 0%
Use in a course

Exercise prompt

Repair Nested Destructuring

Nested destructuring follows the same shape as nested data. Each pair of braces moves into one nested object.

Example

const user = { address: { city: "Lund" } }; const { address: { city } } = user;

Your task

The starter looks for city at the wrong level and displays City: undefined. Repair only the destructuring pattern so it follows account.profile.contact.city and displays City: Malmö.