basic function in swift 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
}