sort
Modified on Tue, 18 Apr 2023
Use this function to sort the array in ascending order.
Syntax
sort(array)
Returns
Return Value | Description |
---|---|
Array | Return the array in ascending order |
Sample
sort (5, 2, 8, 1, 4): Return the output as (1, 2, 4, 5, 8)
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article