Skip to content

Instantly share code, notes, and snippets.

@stevencurtis
Created June 10, 2020 13:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevencurtis/f3e35f7720ad548e723b8049ebebdfc2 to your computer and use it in GitHub Desktop.
Save stevencurtis/f3e35f7720ad548e723b8049ebebdfc2 to your computer and use it in GitHub Desktop.
personopen
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