Created
August 15, 2018 07:10
-
-
Save haikieu/1e9d110445898e6b5179d980f279ff5a to your computer and use it in GitHub Desktop.
unwrap optional type by guard
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
var optionalString : String? | |
guard let theString = optionalString else { | |
return | |
} | |
//do something with theString |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment