Why do we use _ in Swift?

The _ is a placeholder for the parameter name . In your example, you call them differently, in the second function, you need to write the parameter name a: 1 . Swift’s function name convention is funcName(param1:param2:) , and it needs the _ as a placeholder to create the name of the function.

Read more