Vidyalelo
Ruby Programming · Q15

Enumerators and Iterators in Ruby

Programming · Ruby Programming · question 15

Q15

What is the purpose of the times method in Ruby enumerators?

A.
Executes a block of code a specified number of times
Answer
B.
Iterates over each element in a collection
C.
Converts a collection into an enumerator
D.
Sorts elements in a collection

Answer: Option A

Solution

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