Last active
November 21, 2015 21:46
-
-
Save rbrisita/d3f3284fb5a4f11eccea to your computer and use it in GitHub Desktop.
Swift reassign of constant value.
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
var optionalString:String? = nil | |
optionalString = "Temp" | |
let constantString = "No" | |
if let constantString = optionalString | |
{ | |
print("The string's value is: \(constantString)") | |
} | |
print("constantString is \(constantString)") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment