多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
## 控制流(Control Flow) 推荐循环使用`for-in`表达式,而不使用`for-condition-increment`表达式。 推荐做法: ~~~ for _ in 0..<3 { println("Hello three times") } for (index, person) in enumerate(attendeeList) { println("\(person) is at position #\(index)") } ~~~ 不推荐做法: ~~~ for var i = 0; i < 3; i++ { println("Hello three times") } for var i = 0; i < attendeeList.count; i++ { let person = attendeeList[i] println("\(person) is at position #\(i)") } ~~~