Swift: defining custom structs?
Example:
struct Person { var name: String; var age: Int }
Structs are used to define custom data types in Swift.
Solution:
let john = Person(name: "John Doe", age: 30)
Example: Solution:Swift: defining custom structs?
Structs are used to define custom data types in Swift.
struct Person { var name: String; var age: Int }
let john = Person(name: "John Doe", age: 30)