16 ms·
Swift has named arguments, and it's called "external parameter name". Here's an example taken from Apple's documentation[1]. func join(string s1: String, toS
by chingjun 12y ago
Swift has named arguments, and it's called "external parameter name". Here's an example taken from Apple's documentation[1].
func join(string s1: String, toString s2: String, withJoiner joiner: String)
-> String {
return s1 + joiner + s2
}
join(string: "hello", toString: "world", withJoiner: ", ")
// returns "hello, world"
[1]: https://developer.apple.com/library/ios/documentation/swift/conceptual/swift_programming_language/Functions.html https://developer.apple.com/library/ios/documentation/swift/...