Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
4
Task/Named-parameters/Swift/named-parameters-1.swift
Normal file
4
Task/Named-parameters/Swift/named-parameters-1.swift
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
func greet(person: String, hometown: String) -> String {
|
||||
return "Hello \(person)! Glad you could visit from \(hometown)."
|
||||
}
|
||||
print(greet(person: "Bill", hometown: "Cupertino"))
|
||||
4
Task/Named-parameters/Swift/named-parameters-2.swift
Normal file
4
Task/Named-parameters/Swift/named-parameters-2.swift
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
func greet(person: String, from hometown: String) -> String {
|
||||
return "Hello \(person)! Glad you could visit from \(hometown)."
|
||||
}
|
||||
print(greet(person: "Bill", from: "Cupertino"))
|
||||
4
Task/Named-parameters/Swift/named-parameters-3.swift
Normal file
4
Task/Named-parameters/Swift/named-parameters-3.swift
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
func greet(_ person: String, _ hometown: String) -> String {
|
||||
return "Hello \(person)! Glad you could visit from \(hometown)."
|
||||
}
|
||||
print(greet("Bill", "Cupertino"))
|
||||
4
Task/Named-parameters/Swift/named-parameters-4.swift
Normal file
4
Task/Named-parameters/Swift/named-parameters-4.swift
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
func greet(person: String, from hometown: String = "Cupertino") -> String {
|
||||
return "Hello \(person)! Glad you could visit from \(hometown)."
|
||||
}
|
||||
print(greet(person: "Bill"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue