Skip to content

Instantly share code, notes, and snippets.

@andreaslydemann
Created October 22, 2018 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreaslydemann/8d42dd2b11a587dadf978f9dda71de60 to your computer and use it in GitHub Desktop.
Save andreaslydemann/8d42dd2b11a587dadf978f9dda71de60 to your computer and use it in GitHub Desktop.
let myOptional: Int? = nil
let myInt = myOptional ?? 0
print("myInt has a value of \(myInt).")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment