Destructure Rest
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.