Instantly share code, notes, and snippets.

Embed
What would you like to do?
stringVariable?.run {
println("The length of this String is $length")
}
// Similarly.
stringVariable?.let {
println("The length of this String is ${it.length}")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment