Question 3
Back to Exercise
What does const { name: fullName } = user; do?
- A Creates a variable name holding user.fullName
- B Creates both name and fullName
- C Sets user.fullName to user.name
- D Creates a variable fullName holding user.name Correct
Correct Answer: Option D
In an object pattern the left side is the property to read and the right side is the variable to create.
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!