Run ❯
Get your
own
website
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
JavaScript Arrays
The toSorted() Method
The toSorted() method sorts the elements of an array in alphabetical order.