easy5 pts · first answer countsswiftreference-types
Swift class shared reference
What does this Swift code print?
class Counter { var value = 0 }
let a = Counter()
let b = a
b.value = 3
print(a.value)Discussion 0
Join free to post in the discussion.
Related questions
- Safely unwrapping a Swift optionalMobile App Developer
- Swift struct assignment copiesMobile App Developer
- Decoding JSON with extra keysMobile App Developer
- Memory leak with a closureMobile App Developer
- unowned self in a network callbackMobile App Developer
- When a Swift array is copiedMobile App Developer