Why do we need closure in swift?



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

Post New Answer

More Apple iOS Swift Interview Questions

Does swift have header files?

1 Answers  


What is subscript in swift?

1 Answers  


What is framework in swift?

1 Answers  


What are the different control transfer statements used in swift?

1 Answers  


What are the characteristics of switch?

1 Answers  


In swift, what type of object are basic data types?

1 Answers  


Is equal to string swift?

1 Answers  


What will you do if your app is prone to crashing?

1 Answers  


What is a lazy var in swift?

1 Answers  


What is optional chaining?

1 Answers  


Explain the different features of swift programming language?

1 Answers  


Difference in classes and structures in swift?

1 Answers  


Categories