A

Admin • 670.22K Points
Coach

Q. What is the purpose of `optional binding` in Swift?

  • (A) To make a variable global
  • (B) To define a lazy property
  • (C) To safely unwrap an optional
  • (D) To create a loop
  • Correct Answer - Option(C)
  • Views: 1
  • Filed under category Swift (iOs)
  • Hashtags:

Explanation by: Admin
`if let` or `guard let` are used for optional binding to safely unwrap optionals.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.