Q. What is the output of '5.times { |i| puts i }'?
β
Correct Answer: (A)
0 1 2 3 4
Explanation: 'times' iterates from 0 up to one less than the number.