Is there a better alternative to this expression in Kotlin: a == b || a == c
I'm looking for something like a == b || c
or a.equals(b, c)
I think the simplest way is with the in
operator:
a in listOf(b, c)
you can include as many items as you want inside the list.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With