Initialization of nullable types in Swift
Forums:
let number: Int? = 42
let nullInt: Int? = nil
let pi: Double? = 3.14
let charA: Character? = "A"
let hasValue: Bool? = true
let noValue: Bool? = nil
- Log in to post comments
let number: Int? = 42
let nullInt: Int? = nil
let pi: Double? = 3.14
let charA: Character? = "A"
let hasValue: Bool? = true
let noValue: Bool? = nil