Tag Archives: functions

Closures in swift – what are closures ?

Closures in swift Closures are block of function code that can be written without name inside another function call. Just write code within braces {}


Variable argument functions swift

Variable argument functions swift We write the function in the similar way, just we need to take variable number of arguments runtime then we write function in the following way with argument list ending with three dots.


Functions syntax swift – how to write ?

Functions syntax swift func is used to declare a function and passing parameters in parentheses. -> is used for the return type.