Swift version: 5.4. The ternary operator allows you to run a check and return one of two values depending on the result of that check – it has the name “ternary” because it works with three values rather than two or one like other operators.
Swift version: 5.4. The ternary operator allows you to run a check and return one of two values depending on the result of that check – it has the name “ternary” because it works with three values rather than two or one like other operators.