how to add two nullable values
# getting-started
t
how to add two nullable values
m
either with the elvis operator
?:
or with regular null checks
depends a bit on what you expect
t
var a:Int?=100 var bInt?=200 i want a+b
s
a?.let { b?.let { a + b} }
m
usually the first question is, do they need to be nullable?
t
it is giving error
v
a!! + b!!