Intermediate Swift
Q79 / 100

What is @discardableResult when used on property accessors?

Correct! Well done.

Incorrect.

The correct answer is B) Silences the "result of call unused" warning when a method or property access result is not used

B

Correct Answer

Silences the "result of call unused" warning when a method or property access result is not used

Explanation

@discardableResult on functions returning Self (for chaining) lets callers chain without needing the return value, avoiding warnings.

Progress
79/100