`let` is when you have something, and you want to ...
# getting-started
a
let
is when you have something, and you want to change it to something else. Think of it as
map
for a single value. And you can use it along with the
?.
operator to do something if the value isn't null
Copy code
val hello: String = getTheirName().let { "hello ${it}" } 
val number: Int = getTheirPhoneAsString().let { it.toLong() }