Skip to content

Glossary: Rust Basics

Range

Also written: ranges

A sequence of numbers: `1..4` means 1, 2, 3 and `1..=4` includes the 4. Ranges are used in `for` loops, slices and `match` patterns.

Where the book teaches it

Related terms

forSlice