how to use underscore parameter
func test(currentName name: String, _: Int) {
print("aa\(name) abc");
//how to use _ parameter?
}
test(currentName:"aa", 3)
_
means when you call test
function, you don't have to write the text before the second parameter test(currentName:"aa", 3)
if you declare your function like this:
func test(currentName name: String, secondParameter: Int) {
print("aa\(name) abc");
//how to use _ parameter?
}
then when you call test
function, you must to call like this:
test(currentName:"aa", secondParameter: 3)