Hi guys, a quick question...Do I need the (value =...
# getting-started
d
Hi guys, a quick question...Do I need the (value == null) here? Or when the value is null, the "when" expression will trigger the else statement
d
Since
null
is neither
"1"
or
"2"
, etc. yes, the
else
branch will be executed
👍 1
You could even have a
null
branch if you want to be explicit.
👍 2
i
Refactoring by adding else (null) branch seems like a good idea
m
And it's easy enough to test it, too.