JavaScript Array Sort

The sort() method sorts an array alphabetically.

The reverse() method reverts the elements.