Skip to content

Instantly share code, notes, and snippets.

@rbrisita
Last active November 21, 2015 21:46
Show Gist options
  • Save rbrisita/d3f3284fb5a4f11eccea to your computer and use it in GitHub Desktop.
Save rbrisita/d3f3284fb5a4f11eccea to your computer and use it in GitHub Desktop.
Swift reassign of constant value.
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