Swift: using the ternary conditional operator?

Example:

let x = 10
The ternary conditional operator is a shorthand for a simple if-else statement.

Solution:

let result = x > 5 ? "Greater" : "Smaller or Equal"

Beginner's Guide to Swift