Skip to content

Instantly share code, notes, and snippets.

@nanotroy
Created August 27, 2019 15:03
Show Gist options
  • Save nanotroy/13e45bc2af7537f550fba8c011eef3d5 to your computer and use it in GitHub Desktop.
Save nanotroy/13e45bc2af7537f550fba8c011eef3d5 to your computer and use it in GitHub Desktop.
var articleStruct = ArticleStruct(title: "Struct vs Class", url: URL(string: "www.avanderlee.com")!, readCount: 0)
var articleStructCopy = articleStruct
articleStruct.readCount = 10
print(articleStructCopy.readCount) // Prints: 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment