swift 3 – swift optionals

the best way to take care of the optionals mark variable in the swift,

var lotSelected: Int?

if let lot = lotSelected {
    print(lot)
}

always use “if let” sentence to check then use the new constant.

Advertisements