Beginner Swift
Q18 / 100

What does lazy mean on a stored property?

Correct! Well done.

Incorrect.

The correct answer is B) The property's initial value is not computed until it is first accessed

B

Correct Answer

The property's initial value is not computed until it is first accessed

Explanation

lazy var expensiveResource = HeavyObject() defers initialization until first use. Must be var; let cannot be lazy.

Progress
18/100