Learn Ruby
Range
8.7
Lesson

Double dot vs Triple dot

Range supports both double dots and triple dots.

As we can see when we use double dots then range includes the last value. When we use triple dot then the last value is not included.

Let’s see some more examples.