Vidyalelo
Ruby Programming · Q33

Enumerators and Iterators in Ruby

Programming · Ruby Programming · question 33

Q33

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

A.
Splits a collection into chunks based on a given condition
Answer
B.
Combines elements from multiple collections into arrays
C.
Applies a block of code to each element and returns a new collection
D.
Iterates over each consecutive sequence of a given size in a collection

Answer: Option A

Solution

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