Published
- 1 min read
alphabetical order array javascript
The solution for this is noted below
alphabetical order array javascript
Solution
arr.sort(function (a, b) {
return a === b ? 0 : a < b ? -1 : 1
})
Try other methods by searching on the site. That is if this doesn’t work