Greatest element of a list

max method returns the greatest element in a list. It works only if the array's elements have the same type (e.g.: strings, numbers).

values.max