Beginner
Swift
Q33 / 100
What does the @discardableResult attribute do?
Correct! Well done.
Incorrect.
The correct answer is B) Silences the compiler warning when the return value is not used
B
Correct Answer
Silences the compiler warning when the return value is not used
Explanation
@discardableResult on a function prevents the "result of call is unused" warning when callers choose not to use the return value.
Progress
33/100