0 votes
in Ruby by
What are Ruby iterators?

1 Answer

0 votes
by

Iterator is a concept used in object-oriented language. Iteration means doing one thing many times like a loop.

The loop method is the simplest iterator. They return all the elements from a collection, one after the other. Arrays and hashes come in the category of collection.

...