Skip to content

Instantly share code, notes, and snippets.

@PatilShreyas

PatilShreyas/1-Old.kt Secret

Created Dec 24, 2020
Embed
What would you like to do?
fun doSomething(person: Person?) {
if (person != null) {
// Do something with `person`
}
}
fun doSomething(person: Person?) {
person?.let { p ->
// Play with `p` safely :)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment