Programming in Kotlin - Part 25: More Nullables | Ray Wenderlich

Learn how to unwrap Nullables, force unwrap Nullables, and use the let statement.

This is a companion discussion topic for the original entry at

Can u explain the let syntax?i am not able to understand the syntax of let function

The let function is used on nullable variables. It allows you to safely use the variable in other calls.
For example:
var name: String? = “My Name”
name?.let {

you can also give “it” a name:
name?.let { nonNullableName ->