Question 1/12: This code is valid Swift – true or false?
Hint: Click to show.
func login(then action: (String) -> Void) {
print("Authenticating...")
let username = "twostraws"
action(username)
}
login {
print("Welcome, \(username)!")
}
Link copied to your pasteboard.