When I have `when` without an argument and I want ...
# getting-started
f
When I have
when
without an argument and I want to put 2 cases into 1 branch I have to divide them with || , right?
s
What happens when you try
f
Yea IntelliJ suggests it, it's just that I haven't seen it anywhere else yet
k
when
without an argument is just a chain of ifs, and you can put in arbitrary boolean expressions. It doesn't handle
||
specifically, that just how booleans work simple smile
f
Makes sense
a
(chain of if-else-ifs)