Answer Posted / Ankita Mishra
Ruby iterators, also known as Enumerable methods, are predefined functions used to iterate over collections like arrays or hashes. Common examples include each, map, select, and inject (also called reduce). These methods allow for looping through collections without using explicit loops (for or while), making the code more concise and easier to understand.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers