What is a ternary operator in Swift?

Ternary Operator in Swift A ternary operator evaluates a condition and executes a block of code based on the condition . Its syntax is condition ? expression1 : expression2. Here, the ternary operator evaluates condition and. if condition is true, expression1 is executed.

Sizin İçin Seçtik  Why do we use _ in Swift?

Leave a Reply

Your email address will not be published. Required fields are marked *