0

var desc: String { return "traveling at \(currentSpeed) mph" }

can any one explain why here {} use

11th Dec 2016, 11:24 AM
Sandeep Maurya
Sandeep Maurya - avatar
1 Answer
0
Probably it is a closure. // a closure that has no parameters and return a String var hello: () -> (String) = { return "Hello!" }
12th Dec 2016, 12:50 PM
Felipe Cruz
Felipe Cruz - avatar