The reverse method reverses the order of the elements in an array, returning a new array of elements, reversed : reverse « Array « Ruby






The reverse method reverses the order of the elements in an array, returning a new array of elements, reversed



%w[ one two three four five six seven eight nine ten ].reverse

 

Related examples in the same category

1.Reverse the Order of the Array's Elements
2.Reverse in place