daily pastebin goal
75%
SHARE
TWEET

Untitled

a guest Sep 14th, 2017 90 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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top