let oldArray = [1,2,3,4,5,6,7,8,9,10] let newArray = oldArray.filter({$0 >= 4}) NSLog("%@", newArray)
闭合和半闭合区间
for index in 1...5 { NSLog("------%d", index); } for index in 1..<5 { NSLog("------%d", index); }
posted on 2016-02-15 17:50 iOS^_^技术 阅读(131) 评论(0) 收藏 举报