Fundamentals4 / 8
Up next

Type annotations

// types can be written explicitly or left to inference
let count: Int = 7
let ratio: Double = 2.5
let ready: Bool = true
let label: String = "items"
print("\(count) \(label), ratio \(ratio), ready \(ready)")
What you're solving

explicit types and inference