Kotlin Ternary Operator with Example
The ternary operator is the only operator that takes 3 operands. It is used to implement conditional statements in a single line. Various programming languages such as Java, JavaScript, C#, etc have ternary operator feature. Its syntax looks like this: If the condition is true, expression1 is executed otherwise expression2. Does Kotlin Support Ternary Operator? …