Swift - Functions
What will be the output of the following Swift code?
func greet(person name: String) {
print("Hello, \(name)!")
}
greet(person: "Anna")func greet(person name: String) {
print("Hello, \(name)!")
}
greet(person: "Anna")person and parameter name name. The call uses person: "Anna".name is used, so it prints "Hello, Anna!".15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions