Why do we need closure in swift?
Answer / Shyampal Singh
Closures are necessary in Swift for several reasons, including capturing and storing functions as values, defining abstractions that hide implementation details from users, allowing functions to be nested within other functions, and handling asynchronous code.
| Is This Answer Correct ? | 0 Yes | 0 No |
Does swift have header files?
What is subscript in swift?
What is framework in swift?
What are the different control transfer statements used in swift?
What are the characteristics of switch?
In swift, what type of object are basic data types?
Is equal to string swift?
What will you do if your app is prone to crashing?
What is a lazy var in swift?
What is optional chaining?
Explain the different features of swift programming language?
Difference in classes and structures in swift?