A

Admin • 670.22K Points
Coach

Q. Which of the following declares an empty dictionary?

  • (A) let dict = Dictionary<String, Int>()
  • (B) let dict = {}
  • (C) let dict = [String: Int: String]()
  • (D) let dict = [String, Int]()
  • Correct Answer - Option(A)
  • Views: 1
  • Filed under category Swift (iOs)
  • Hashtags:

Explanation by: Admin
This is the correct syntax for creating an empty dictionary.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.