R

Ravina • 2.56K Points
Extraordinary

Q. What is the default value of an optional variable in Swift?

  • (A) null
  • (B) nil
  • (C) 0
  • (D) undefined
  • Correct Answer - Option(B)
  • Views: 1
  • Filed under category Swift (iOs)
  • Hashtags:

Explanation by: Ravina
Optional variables in Swift are nil by default if not initialized.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.