Skip to content

Instantly share code, notes, and snippets.

@agoiabel
Last active January 11, 2018 06:58
Show Gist options
  • Save agoiabel/a29af8c1a8ad570e39b5807a8dcc8784 to your computer and use it in GitHub Desktop.
Save agoiabel/a29af8c1a8ad570e39b5807a8dcc8784 to your computer and use it in GitHub Desktop.
struct Dog {
let name: String
var age: Int
var breed: String
}
var dog1 = Dog(name: "Jerry", age: 2, breed: "Poodle")
var dog2 = dog1
dog2.name = "JaneDony"
dog1.name //will be equal to :::"Jerry" instead of been JaneDony
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment