struct Person {
var name: String
var age: Int
init(name: String, age: Int) {
self.name = name
self. age = age
}
}
// Person instance:
var morty = Person(name: "Peter", age: 14)
Comments
struct Person {
var name: String
var age: Int
init(name: String, age: Int) {
self.name = name
self. age = age
}
}
// Person instance:
var morty = Person(name: "Peter", age: 14)