Join Slack
Powered by
is their syntactic sugar around `if (a != null &am...
# announcements
x
xenoterracide
12/10/2018, 10:34 PM
is their syntactic sugar around
if (a != null && b != null ) {
like there is with
a?.let {
?
d
diesieben07
12/10/2018, 10:37 PM
That's not syntax sugar, that is an entirely different thing. There is nothing wrong with writing an if expression.
x
xenoterracide
12/10/2018, 10:40 PM
tomato potato, can I check 2 vars for null and do something like
(a, b)?.let {
xenoterracide
12/10/2018, 10:40 PM
only if neither is null
d
diesieben07
12/10/2018, 11:03 PM
Yes, the solution is an if expression 😛
👍 1
3
Views
Open in Slack
Previous
Next