Created
June 10, 2020 13:24
-
-
Save stevencurtis/f3e35f7720ad548e723b8049ebebdfc2 to your computer and use it in GitHub Desktop.
personopen
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 Person { | |
var name: String | |
var age: Int | |
init(name: String, age: Int) { | |
self.name = name | |
self.age = age | |
} | |
} | |
let imani = Person(name: "Imani", age: 45) | |
imani.age = 46 | |
imani.name = "Roger" | |
print (imani.name, imani.age) // Roger 46 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment