Codington
0 of 10 problems solved • 0%
Use in a course

Exercise prompt

Read an Optional Contact

Before following a nested path, a condition can check whether the intermediate object exists.

Your task

Complete getEmailLabel(profile) so it returns the nested email when contact exists and No email otherwise. The existing calls must display Mira: [email protected] and Leo: No email without causing an error.