```val copy = value if (copy != null) {} else {}``...
# announcements
k
Copy code
val copy = value
if (copy != null) {} else {}
n
yes but it’s less readable than swift solution
k
Yes it takes one extra line.
n
yes and you can use copy on all the code not only in if
k
Put the whole thing is another
{ }
😃