age = 43
print(age == 50 ? "Half a century baby!" : "Hey there.")
Note
I am not sure we should implement this. @Jozott00 what are your thoughts?
We used this one in the spec to describe the ?? operator but the ternary operator is not the easiest to read. However, it is useful to write quick conditions.
Example
Note
I am not sure we should implement this. @Jozott00 what are your thoughts?
We used this one in the spec to describe the
??
operator but the ternary operator is not the easiest to read. However, it is useful to write quick conditions.