Intermediate
Swift
Q59 / 100
What is a KeyPath in Swift?
Correct! Well done.
Incorrect.
The correct answer is B) A type-safe reference to a property or subscript of a type, enabling first-class property access
B
Correct Answer
A type-safe reference to a property or subscript of a type, enabling first-class property access
Explanation
\User.name creates a KeyPath<User, String>. Use with users.map(\User.name) or keyPath syntax in Combine/SwiftUI binding.
Progress
59/100