You have a function sendEmail
that simulates sending an email. Write a function emailHandler
to makes sure the email process is handled and the corresponding messages are logged to the console in all cases. Additionally, make sure you always log the completionMessage
regardless of the outcome.
Finally, call the function getWeather
with the value hello@example.com.