logo
logo

Destructure Rest

Beginner

Destructure Rest

Create a function called
getProfile
that takes in an object containing
name
,
email
,
phone
, and
age
fields. Destructure the object to get only the
name
field and the remaining fields using the rest operator. Return an object with the
name
field and an object containing the rest of the fields.
Console
Submit
Solution
00:00