DEV Community

Cover image for Variadic Parameters in Swift
Saif Ullah Sajid
Saif Ullah Sajid

Posted on

Variadic Parameters in Swift

In Swift functions with variadic parameter accepts zero or more values of a specified type. You use a variadic parameter to specify that the parameter can be passed a varying number of input values when the function is called. Write variadic parameters by inserting three period characters (...) after the parameter’s type name. Print is one the most commonly used examples.

Top comments (0)