Created
August 27, 2019 15:03
-
-
Save nanotroy/13e45bc2af7537f550fba8c011eef3d5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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