ternary conditional expression in text swiftUI code example Example: swift ternary statement myBool = str1 != nil ? true : false print(myBool)