SHARE
TWEET

Untitled

a guest Sep 14th, 2017 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. func displayErrorMessage(_ optionalMessage: String?) {
  2.    if let message = optionalMessage {
  3.       print(message)
  4.    }
  5. }
  6.  
  7. displayErrorMessage("Something went wrong") // Prints out "Something went wrong"
  8. displayErrorMessage(nil) // doesn't do anything
RAW Paste Data
Top