Answer Posted / Sumit Singh Nayal
The syntax for Ruby's collect iterator is: array.collect { |element| block }. The block is a piece of code that gets executed for each element in the array. The collected elements are then returned as a new array.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers