DEV Community

Discussion on: We don't need a ternary operator

Collapse
 
dean profile image
dean

And in Kotlin! Although Kotlin doesn't have a ternary operator.

It has the Elvis Operator ?: which behaves like C's ternary operator when you omit the middle value... So it's the same as C#'s coallessing operator (??) but it has a groovier syntax!