As Iterator « Range « Ruby






1.When a range is used as an iterator, each value in the sequence is returned.
2.each and each_with_index loop with range
3.each_slice loop with range
4.each_cons loop with range