Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

Swift Closure Parameters

// closure that accepts one parameter
let greetUser = { (name: String)  in
    print("Hey there, (name).")
}

// closure call
greetUser("Delilah")
 
PREVIOUS NEXT
Tagged: #Swift #Closure #Parameters
ADD COMMENT
Topic
Name
5+4 =