Question 11
Back to Exercise
After const { address: { city } } = user;, which variables exist?
- A address and city
- B Only city Correct
- C Only address
- D user, address and city
Correct Answer: Option B
address is just the path to city. To have both, write const { address, address: { city } } = user;.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!