is it a better way of doing this? I would expect s...
# getting-started
c
is it a better way of doing this? I would expect something like a
guard
in swift
l
val firstName = person?.firstname ?: return false
would be my way to go if you need to use
firstName
subsequently. I would use the
if
otherwise. You can consider using
.let{}
maybe. But that’s about it afaik
👍 1