Search…
Resources
Related Links
sort
To sort values in ascending order
This function helps you to sort values in ascending order.
You can pass any number of parameters. Requirement: They have the same data type.
  • If you pass single values (no array), they will be concatenated and returned as a sorted array.
  • When you pass 1 or more arrays, they will be "merged" and returned as a single sorted array.

sort(any, any, ...)
sort([any], [any], ...)

[any]

sort("B", "E", "A", "E", "D", "C")
Result: A,B,C,D,E,E
​
sort(["B", "E", "A"], ["E", "D", "C"])
Result: A,B,C,D,E,E

​rsort, which sorts an array in descending order.
Last modified 2mo ago
Export as PDF
Copy link
On this page
Syntax
Return
Examples
See also