how to remove all the value from Dictionary in swift?

0 votes
106 views
asked Mar 3, 2015 in Swift by arthi (1,110 points)
Hi All

  how to remove all the value from Dictionary in swift?

1 Answer

0 votes
answered Mar 3, 2015 by codeg (2,600 points)
Hi Arthi

  var namesOfIntegers = [Int: String]()

        namesOfIntegers[16] = "sixteen"

 // Empty dic

      namesOfIntegers = [:]
...