3 ms·
I would have said you can do it like this as in swift. let x = 1231231 let z = 0 if z == 0 { println("Cant divide by zero") } else { println(x / z) } But
by masters3d 12y ago
I would have said you can do it like this as in swift.
let x = 1231231
let z = 0
if z == 0 {
println("Cant divide by zero")
}
else { println(x / z)
}
But swift doesn't support exceptions either. :/