javasc ript sort array of strings code example
Example: alphabetical order array javascript
arr.sort(function(a, b) {
return a === b ? 0 : a < b ? -1 : 1;
});
arr.sort(function(a, b) {
return a === b ? 0 : a < b ? -1 : 1;
});