Created
April 13, 2018 02:51
-
-
Save jimmythai/d6561e17c0e468235b98f6572b854e7a to your computer and use it in GitHub Desktop.
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
| class Dog { | |
| private (set) var name = "" | |
| func change(name: String) { | |
| self.name = name | |
| } | |
| } | |
| let dog = Dog() | |
| print(dog.name) // This is ok | |
| dog.name = "Hachi" // This is no ok |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment