swift func: i can't understand underscore as a parameter name that can compile -


how use underscore parameter

func test(currentname name: string, _: int) {      print("aa\(name) abc");     //how use  _  parameter? }  test(currentname:"aa", 3) 

_ means when call test function, don't have write text before second parameter test(currentname:"aa", 3)

if declare function this:

func test(currentname name: string, secondparameter: int) {         print("aa\(name) abc");     //how use  _  parameter? } 

then when call test function, must call this:

test(currentname:"aa", secondparameter: 3) 

Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -