Loading…

What are lazy stored properties, and how are they useful?

Any property whose initial values are not calculated until the first time it is used is called a lazy stored property. Such properties can be declared by writing the lazy modifier. These properties are useful when the initial value of a property is dependent on external factors whose values are unknown.

Suggest An Answer

No suggestions avaliable!

Latest post from Swift Interview Questions

Ask Question