Range operators in Ruby

Range operators in ruby are used to extract a sequence. Sequences have an initial point and end point by which we can generate consecutive values in the sequence. The values of a range may be objects, numbers, characters or strings.


There are two types of range operators:

1Inclusive range operator that is two-dot (..)
2. Exclusive operator that is three-dot operator (...)

Range operators in Ruby #ruby #rubydeveloper #rubyonrails

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles