1. What is Closure ? Junior A. the way a block grabs and retains outside constants and variables it references B. a self-contained block of code that can be passed around and captures references from its surrounding scope C. the default for a block guaranteed to run before the enclosing function returns, allowing optimizations D. syntax that moves a function's final block argument outside the parentheses for readability Reveal the answer + AI explanation — free account
2. Which term means: "a self-contained block of code that can be passed around and captures references from its surrounding scope"? Junior A. Trailing closure B. Variable capture C. non-escaping D. Closure Reveal the answer + AI explanation — free account
3. Which statement is correct? Junior A. Closure — an attribute marking a block that may be stored and called after the function it was passed to returns B. Closure — a self-contained block of code that can be passed around and captures references from its surrounding scope C. Closure — syntax that moves a function's final block argument outside the parentheses for readability D. Closure — the way a block grabs and retains outside constants and variables it references Reveal the answer + AI explanation — free account
4. What is Trailing closure ? Mid A. a self-contained block of code that can be passed around and captures references from its surrounding scope B. the default for a block guaranteed to run before the enclosing function returns, allowing optimizations C. syntax that moves a function's final block argument outside the parentheses for readability D. an attribute marking a block that may be stored and called after the function it was passed to returns Reveal the answer + AI explanation — free account
5. Which term means: "syntax that moves a function's final block argument outside the parentheses for readability"? Mid A. escaping B. non-escaping C. Trailing closure D. Closure Reveal the answer + AI explanation — free account
6. Which statement is correct? Mid A. Trailing closure — an attribute marking a block that may be stored and called after the function it was passed to returns B. Trailing closure — the default for a block guaranteed to run before the enclosing function returns, allowing optimizations C. Trailing closure — syntax that moves a function's final block argument outside the parentheses for readability D. Trailing closure — a self-contained block of code that can be passed around and captures references from its surrounding scope Reveal the answer + AI explanation — free account
7. What is escaping ? Senior A. syntax that moves a function's final block argument outside the parentheses for readability B. the way a block grabs and retains outside constants and variables it references C. an attribute marking a block that may be stored and called after the function it was passed to returns D. the default for a block guaranteed to run before the enclosing function returns, allowing optimizations Reveal the answer + AI explanation — free account
8. Which term means: "an attribute marking a block that may be stored and called after the function it was passed to returns"? Senior A. escaping B. Closure C. Trailing closure D. non-escaping Reveal the answer + AI explanation — free account
9. Which statement is correct? Senior A. escaping — an attribute marking a block that may be stored and called after the function it was passed to returns B. escaping — the way a block grabs and retains outside constants and variables it references C. escaping — the default for a block guaranteed to run before the enclosing function returns, allowing optimizations D. escaping — a self-contained block of code that can be passed around and captures references from its surrounding scope Reveal the answer + AI explanation — free account
10. What is non-escaping ? Senior A. a self-contained block of code that can be passed around and captures references from its surrounding scope B. the default for a block guaranteed to run before the enclosing function returns, allowing optimizations C. syntax that moves a function's final block argument outside the parentheses for readability D. the way a block grabs and retains outside constants and variables it references Reveal the answer + AI explanation — free account
11. Which term means: "the default for a block guaranteed to run before the enclosing function returns, allowing optimizations"? Senior A. non-escaping B. Closure C. Variable capture D. escaping Reveal the answer + AI explanation — free account
12. Which statement is correct? Senior A. non-escaping — syntax that moves a function's final block argument outside the parentheses for readability B. non-escaping — the way a block grabs and retains outside constants and variables it references C. non-escaping — an attribute marking a block that may be stored and called after the function it was passed to returns D. non-escaping — the default for a block guaranteed to run before the enclosing function returns, allowing optimizations Reveal the answer + AI explanation — free account
13. What is Variable capture ? Mid A. the default for a block guaranteed to run before the enclosing function returns, allowing optimizations B. the way a block grabs and retains outside constants and variables it references C. syntax that moves a function's final block argument outside the parentheses for readability D. an attribute marking a block that may be stored and called after the function it was passed to returns Reveal the answer + AI explanation — free account
14. Which term means: "the way a block grabs and retains outside constants and variables it references"? Mid A. Trailing closure B. Closure C. escaping D. Variable capture Reveal the answer + AI explanation — free account
15. Which statement is correct? Mid A. Variable capture — the default for a block guaranteed to run before the enclosing function returns, allowing optimizations B. Variable capture — the way a block grabs and retains outside constants and variables it references C. Variable capture — syntax that moves a function's final block argument outside the parentheses for readability D. Variable capture — a self-contained block of code that can be passed around and captures references from its surrounding scope Reveal the answer + AI explanation — free account