How is an iterator handled in Ruby?

Questions by Robert   answers by Robert

Showing Answers 1 - 3 of 3 Answers

Ayyappan K

  • Sep 21st, 2007
 

Iterator is handled using keyword 'each' in ruby.
For example
$no=[1,2,3]
then we can use iterator as
$no.each do |l|
puts l
end
Above prints the values of an array $no which is accomplished using iterator.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions