swift循环

时间:2023-12-24 14:29:37

for index in ..< {
    println("\(index)")
} for index in ... {
    println("\(index)")
} var arr = ["hah","xixi"] for value in arr {
    println("value:\(value)")
} var i = 
while i<arr.count {
    println("i:\(i)")
    i++;
} var dic = ["":"ahha","":"lala"] for (key,value)in dic {
    println("key:\(key),value:\(value)")
}