A

Admin • 828.03K Points
Coach

Q. How do you provide a fallback value for an optional?

  • (A) Using ||
  • (B) Using ??
  • (C) Using ?
  • (D) Using if-else
  • Correct Answer - Option(B)
  • Views: 8
  • Filed under category Swift (iOs)
  • Hashtags:

Explanation by: Admin
`??` provides a default value if an optional is nil.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.