hey, is it possible to add another condition in th...
# announcements
m
hey, is it possible to add another condition in the same
is
inside
when()
statement? something like :
Copy code
when(someVariable) {
        is Int or is String {
            \\\something
        } 
    }
m
mnawrot:
is Int, is String ->
👍 1
m
excellent, thanks 🙂
l
@miha-x64 does that imply
and
or
or
?
m
it is
or
, e. g.
when (n) { 1, 2, 3 -> … }
means
n == 1 || n == 2 || n == 3
s
why is this post pinned?
👍 2
m
@s.luhmirins fixed.