标签:
闭区间
[a,b] ---> a...b
前闭后开区间
[a,b) ---> a..<b
for index in 1...10 println(index) // 输出1~10 for index in 0..<10 println(index) // 输出0~9 // index为常量,不需要指定类型
let names = ["jack","lily","allen "] for i in 0..<names.count { println(names[i]) }
标签:
原文地址:http://www.cnblogs.com/lancely/p/4863491.html