What Swift feature allows you to write asynchronous code that looks synchronous?
iOS interview question for Intermediate practice.
Answer
async/await
Explanation
The async/await keywords are the core feature of Swift's modern concurrency model designed specifically to allow developers to write asynchronous code in a linear, sequential style that closely resembles synchronous code. It eliminates the need for nested completion handlers (closures) for many common asynchronous patterns. While GCD (A), Closures (B), and Combine (D) are related to concurrency and asynchronicity, only async/await directly provides the syntax for writing asynchronous code that looks synchronous.