Created
September 14, 2017 08:40
-
-
Save amlcurran/eed0ff6fbca488d8e82e0557cff815de to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func displayErrorMessage(_ optionalMessage: String?) { | |
if let message = optionalMessage { | |
print(message) | |
} | |
} | |
displayErrorMessage("Something went wrong") // Prints out "Something went wrong" | |
displayErrorMessage(nil) // doesn't do anything |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment