Learn Ruby
Array
14.17
Lesson

sort to sort items of array

Array provides sort method to sort the elements in array in ascending order.

Let’s see one more example.