Hi guys, silly question... If I'm using `something...
# android
j
Hi guys, silly question... If I'm using
something?.let{}
there is a fallback delegate for the case of the item be null? Or in this case I should write a null check?
l
Not for let, because the last statement of let may be null, but there's for also. You can simply use elvis operator like this:
something?.also { ... } ?: somethingElse()
☝🏼 2