Format nested user data into a smaller profile summary.
Start building, submit solution and get feedback from the community.
2Submit Solution
5 upvotes10 upvotes
User Profile Formatter
Format a nested user object into values that are easier to show in an interface or return from an API. The final summary should collect the smaller pieces.
Write these functions:
getDisplayName(user) should return the first and last name as one string.
getLocation(user) should return "City, Country".
getContactSummary(user) should return an object with email and phone.
isAccountActive(user) should return true when account.status is "active".
createProfileSummary(user) should return displayName, location, contact, active, and plan.