Reverse each with array : reverse_each « Array « Ruby






Reverse each with array


a = ['a','b','c']
a.reverse_each {|e| print e}       # Array-specific: prints "cba"

 

Related examples in the same category

1.Reverse from backend with reverse_each