πŸ“Š Ruby
Q. How do you define a custom iterator in Ruby?
  • (A) By using the define_iterator keyword
  • (B) By extending the Iterator class
  • (C) By creating a method that yields to a block of code
  • (D) By invoking the create_iterator method
πŸ’¬ Discuss
βœ… Correct Answer: (C) By creating a method that yields to a block of code

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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