Reverse from backend with reverse_each : reverse_each « Array « Ruby






Reverse from backend with reverse_each


[1, 2, 3, 4].reverse_each { |x| puts x }
# 4
# 3
# 2
# 1

 








Related examples in the same category

1.Reverse each with array