Beginner
Swift
Q4 / 100
What does if let do in Swift?
Correct! Well done.
Incorrect.
The correct answer is B) Optional binding — unwraps an optional and binds its value to a constant if non-nil
B
Correct Answer
Optional binding — unwraps an optional and binds its value to a constant if non-nil
Explanation
if let name = optName { use name } safely unwraps optName, executing the block only if it is non-nil.
Progress
4/100