Mega Code Archive

 
Categories / Ruby / Array
 

Reverse from backend with reverse_each

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