Skip to content

Glossary: Swift Basics

range

Also written: ranges, closed range, half-open range

A run of numbers: `1...5` includes 5 and `1..<5` stops just before it. Ranges work in loops, `contains` and `switch` cases.

Where the book teaches it

Related terms

for loopswitch