+ 1

Double ?? what is the role of double in this code, please ?

let mult = 9 let message = "\(mult)times 3.5 is \(Double(mult) * 3.5)" // "" should not be omitted. Why Double? what is the meaning and logic/function?? print(message)

24th Apr 2020, 2:19 AM
kp kalia
kp kalia - avatar
1 Resposta
+ 2
Double is a variable type and here it is converting (mult) into a double.
25th Apr 2020, 4:14 AM
Tarun Kumar
Tarun Kumar - avatar