Skip to main content
Journey Uncommon Logo
JourneyUncommon
easySwiftoptional chainingSingle-choice MCQ

Given an optional `user?.address?.city` where `user` is non-nil but `address` is `nil`, what is the result type and value of the whole expression?

struct Address { let city: String } struct User { let address: Address? } let user: User? = User(address: nil) let result = user?.address?.city