mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2026-09-24 15:00:31 +08:00
* refactor: clean to roadmap content * refactor: move shared helpers into scripts/lib
703 B
703 B
Ranges
Ranges in Ruby are used to create a sequence of values. They are defined using two endpoints, which can be numbers, characters, or any objects that can be compared using the <=> operator. Ranges can be inclusive (including the last value) or exclusive (excluding the last value), denoted by .. and ... respectively. They are commonly used for iterating over a sequence, creating subsets of arrays, and checking if a value falls within a specific interval.
Visit the following resources to learn more: