Skip to main content
Returns the elements of the input array in descending order. If the argument <function> is provided, the sorting order is determined by the result of applying <function> on each element of the array.

Syntax

Parameters

Return Type

ARRAY of the same type as the input array

Examples

Rows: 1Execution time: 6.25ms

In this example, the modulus operator is used to calculate the remainder on any odd numbers. Therefore ARRAY_REVERSE_SORT puts the lower (even) numbers last in the results.

Rows: 1Execution time: 6.64ms