Created
March 16, 2017 13:55
-
-
Save nhathm/4db0cfc6f4c921ff8f4372e2162e4143 to your computer and use it in GitHub Desktop.
This file contains 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
// Declare non-optionals variable | |
var notToday : String = "Tomorrow" | |
// Can't set non-optionals variable to nil | |
notToday = nil // Compile error | |
// Declare optionals variables | |
var dafug : String? = "Dafug" | |
var steps : Int? = 10 | |
// Set to nil | |
dafug = nil | |
steps = nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment