Swift 5.9 if/switch Expressions
With Swift 5.9 we can now use if and switch statements on the right-hand side of the = sign, like this:
1
let result = if <some-condition> { .. } else { .. }
More examples here:
With Swift 5.9 we can now use if and switch statements on the right-hand side of the = sign, like this:
1
let result = if <some-condition> { .. } else { .. }
More examples here: