Beginner
Swift
Q36 / 100
What is a trailing closure syntax?
Correct! Well done.
Incorrect.
The correct answer is B) A syntax allowing a closure argument to be written after the function call parentheses
B
Correct Answer
A syntax allowing a closure argument to be written after the function call parentheses
Explanation
array.sort() { $0 < $1 } or array.sort { $0 < $1 } are trailing closure forms of sort(by:). Improves readability for long closures.
Progress
36/100