Created
June 24, 2015 05:59
-
-
Save leopic/79b8b9ffa4eb5ab7ea90 to your computer and use it in GitHub Desktop.
If you assign an instance of a reference type to a constant, you can still change that instance’s variable properties.
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
class Persona { var nombre:String? } | |
let alejo = Persona() | |
alejo.nombre = "Alejo" | |
if let nombre = alejo.nombre { | |
println(nombre) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment