R

Ravina • 2.56K Points
Extraordinary

Q. What is the purpose of the `lazy` keyword in Swift?

  • (A) To delay initialization until first use
  • (B) To create optional properties
  • (C) To mark properties as final
  • (D) To improve performance by skipping values
  • Correct Answer - Option(A)
  • Views: 1
  • Filed under category Swift (iOs)
  • Hashtags:

Explanation by: Ravina
`lazy` allows you to defer the creation of a property until it is first accessed.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.