Mega Code Archive
Categories
/
Ruby
/
Range
Get three out of five
p (1..5).take(3) # => [1,2,3]