Understanding Sort Function in JavaScript.
Sort Function
Used to Sort Arrays in JavaScript.
This method mutates the original array.
By default, the order is ascending but we can change the order.
We can also provide our compare function to implement custom sorting.
As you can the result is...
vishwajeetraj11.hashnode.dev2 min read