let oldArray = [1,2,3,4,5,6,7,8,9,10] let newArray = oldArray.filter({$0 >= 4}) NSLog("%@", newArray)
闭合和半闭合区间spa
for index in 1...5 { NSLog("------%d", index); } for index in 1..<5 { NSLog("------%d", index); }