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 β†’