我是 swift 新手。我尝试学习许多教程,但仍然无法找到解决方案。我想将存储在数组中的值传递给函数。
let trackList = ["AC","BB"]
for trackId in trackList{
let ind = trackList.index(of: trackId)
let index = trackList.startIndex.distance(to: ind!)
let num = Int(String(describing: ind))
let track = String(trackId)
addDiaryList(track:String) //i keep getting error here saying: Cannot convert value of type 'String.Type' to expected argument type 'String'
}
func addDiaryList(track:String) {
}