Forums
Learn
Careers
Store
About
SUBSCRIBE
TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>
Question 1/12: This code contains a valid Swift closure – true or false?
Hint: Closures don't take parameters in parentheses, and they are case-sensitive just like regular functions. Click to show.
func signAutograph(to name: String) { print("To \(name), my #1 fan") } signAutograph(to: "Lisa")
Correct! This is a plain old function, not a closure.
Oops – that's not correct. This is a plain old function, not a closure.
Return to Review Menu
You are not logged in
Link copied to your pasteboard.