SORT_ARRAY
Description
The SORT_ARRAY
function is used to sort the elements of an array. During the sorting process, null
values will be placed at the beginning of the array. This function is very useful when dealing with arrays containing multiple data types.
Parameter Description
array
:array<T>
type, representing the array to be sorted.asc
: Optional parameter, boolean value, indicating whether to sort in ascending order. The default value istrue
, which means ascending order by default.
Return Type
- Returns a sorted array of type
array<T>
.