Learning Kotlin Programming

Simple Kotlin Null Check for Multiple Mutable Variables

Don’t need to use nested let-let

--

Photo by Jeremy Perkins on Unsplash

Kotlin when introduced has great null safety features. Most people know that one can use let to perform a null-safety check for a mutable nullable variable e.g.

nullableVariable?.let {
nonNullVariable ->…

--

--