Because it’s a dictionary, no enumerate() required:
var aDictionary: [String: Float] = ["EUR": 1, "RON": 4.5,
"USD": 1.3]
for (index,item) in aDictionary{
print(index,item)
}
solved How can I loop through objects in Swift? [closed]
Because it’s a dictionary, no enumerate() required:
var aDictionary: [String: Float] = ["EUR": 1, "RON": 4.5,
"USD": 1.3]
for (index,item) in aDictionary{
print(index,item)
}
solved How can I loop through objects in Swift? [closed]