Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

Swift Function overloading with Argument Label

func display(person1 age:Int) {
    print("Person1 Age:", age)
}

func display(person2 age:Int) {
    print("Person2 Age:", age)
}

display(person1: 25)

display(person2: 38)
 
PREVIOUS NEXT
Tagged: #Swift #Function #overloading #Argument #Label
ADD COMMENT
Topic
Name
7+9 =