Skip to content

Instantly share code, notes, and snippets.

@stevencurtis
Created June 10, 2020 11:49
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/c0d4b662a4fe514b22ed9f96eea952e1 to your computer and use it in GitHub Desktop.
Save stevencurtis/c0d4b662a4fe514b22ed9f96eea952e1 to your computer and use it in GitHub Desktop.
persondefault
class Person {
var name: String
var age: Int
init(name: String, age: Int = 21) {
self.name = name
self.age = age
}
}
let chau = Person(name: "Chau")
print (chau.name)
print (chau.age)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment