← Code LabTypeScript0/50 solved · 0%
Objects · easy

6. Optional Properties

Properties that may or may not exist.

Update `User` to have an optional `email`. `format(user)` should return 'name <email>' if email exists, else just 'name'.
Required in your answer: email?user.email