πŸ“Š Ruby
Q. What is the purpose of the Enumerable#reduce method in Ruby?
  • (A) It filters elements of a collection based on a given condition
  • (B) It transforms each element of a collection using a given block
  • (C) It sorts elements of a collection based on a given criteria
  • (D) It combines all elements of a collection into a single value using a binary operation
πŸ’¬ Discuss
βœ… Correct Answer: (D) It combines all elements of a collection into a single value using a binary operation

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
111
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
81%
Success Rate