Vidyalelo
Ruby Programming · Q20

Enumerators and Iterators in Ruby

Programming · Ruby Programming · question 20

Q20

What does the max_by method do in Ruby enumerators?

A.
Returns the maximum value in a collection
B.
Returns the element with the maximum index
C.
Returns the element with the maximum length
D.
Returns the element with the maximum value based on a given condition
Answer

Answer: Option D

Solution

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