A

Admin • 802.91K Points
Coach

Q. What does the nil coalescing operator `??` do?

  • (A) Returns true if both are nil
  • (B) Unwraps optional or provides default value
  • (C) Checks for nil only
  • (D) Replaces nil with 0
  • Correct Answer - Option(B)
  • Views: 5
  • Filed under category Swift (iOs)
  • Hashtags:

Explanation by: Admin
`??` is used to unwrap an optional or provide a default value if it is nil.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.