Quiz · Closures · lesson 3 of 8Quiz — a closureWhat is a closure in Swift?[A]A function without a name, written right in the code in curly braces, that is cut off from the code around it: its body sees only its own parameters, never a constant declared right next to it.[B]A function without a name whose parameters are always called $0, $1 and so on: a closure cannot give its parameters names of its own, so { x in x * 2 } is not a closure at all.[C]A block of code in curly braces that runs at once, right where it is written, like the body of an if or a for loop. So it cannot be stored in a constant for later or passed to another function as an argument.[D]A function without a name, written right in the code in curly braces, as in { x in x * 2 }. It can be stored in a constant or passed as an argument, and its body sees the constants and variables around it.← BackClosure syntaxNext →map, filter, reduce