The sort() function of array object sorts the elements of an array. Use it for example to sort element of existing array.
Syntax
This will produce following result