This works well for strings ("Apple" comes before "Banana"). However, if numbers are sorted as strings, "25" is bigger than "100", because "2" is bigger than "1".
Because of this, the sort() method will produce an incorrect result when sorting numbers.
You can fix this by providing a "compare function" (See "Parameter Values" below).
Parameters: This method accept a single parameter as mentioned above and described below:
Then a comes before b in the answer.
Then b comes before a in the answer.
Sort an array alphabetically, and then reverse the order of the sorted items (descending):