How to sort an array of strings in JavaScript?
Originally posted here!
To sort an array of strings in JavaScript, you can use the sort() method on the array object.
// sort array
arr.sort();
Sort the array in ascending order
By default, the sort() method sorts the array in ascending order.
// a...
melvingeorge-me.hashnode.dev3 min read