Vidyalelo
Ruby Programming · Q3

Enumerators and Iterators in Ruby

Programming · Ruby Programming · question 3

Q3

What is the purpose of the each method in Ruby iterators?

A.
To iterate over each element in a collection
Answer
B.
To filter elements in a collection
C.
To map elements to a new collection
D.
To sort elements in a collection

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board