Skip to content

Instantly share code, notes, and snippets.

@agoiabel
Last active January 11, 2018 07:05
Show Gist options
  • Save agoiabel/ddef231f3c98aa520b7872943770de29 to your computer and use it in GitHub Desktop.
Save agoiabel/ddef231f3c98aa520b7872943770de29 to your computer and use it in GitHub Desktop.
struct Dog {
let name: String
var breed: String
var age: Int
}
//accessing the struct
var myDog = Dog(name: "Molly", breed: "Lhasa Apso", age: 1)
myDog.name //will return Molly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment