Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

swift accepting parameters in closures

let driving = { (place: String) in
print("im going (place)")
    
}
driving("home")

() after first { and the after you make parameters write in
 use driving("home") to call function.
                
 
PREVIOUS NEXT
Tagged: #swift #accepting #parameters #closures
ADD COMMENT
Topic
Name
3+3 =