🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
## 控制流(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)") } ~~~