swift function syntax code example
Example: declare function in swift
func greet(person: String) -> String {
let greeting = "Hello, " + person + "!"
return greeting
}
func greet(person: String) -> String {
let greeting = "Hello, " + person + "!"
return greeting
}