3 ms·
In kotlin you can also write: var name: String? // some code name?.let { // here name is not nil and can be accessed via variable "it"
by flaie 9y ago
In kotlin you can also write:
var name: String?
// some code
name?.let {
// here name is not nil and can be accessed via variable "it"
}
// or
name?.let { name ->
// here name shadows the previous variable, and is not nil
}