Answers for "loop through all values in dictionary in swift"

2

loop key value swift

func findDic(dict: [String: String]){
    for (key, value) in dict{
    print("(key) : (value)")
  }
}

findDic(dict: ["Animal":"Lion", "Bird":"Sparrow"])
//prints Animal : Lion 
         Bird : Sparrow
Posted by: Guest on August-05-2020

Code answers related to "loop through all values in dictionary in swift"

Code answers related to "Swift"

Browse Popular Code Answers by Language