adspace
What is the difference between closure and function in swift?
Answer Posted / Manoj Kumar Chaubey
"A closure in Swift is a block of reusable code that can be passed around and used in your app. It is syntactically similar to a function but does not have a name. Functions, on the other hand, are named blocks of reusable code that perform an action or return a value. Closures can capture and store references to any constants and variables from the context in which they are defined."
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers