범위연산자 (Range Operater)


닫힌범위 연산자 (Closed range operator)

1 ... 5

반 닫힌 범위 연산자(Half-closed range operator)

1 ..< 5

사용 예시)


let a = 1
let b = 5

for row in a...b {
		print(row)
}
//1, 2, 3, 4, 5

for row in a..<b {
	print(row)
}
//1, 2, 3, 4