In this problem, I couldn’t work out how to solve them until I come to the solution section. I then copied and pasted the solution provided but the output doesn’t change.
Site
/javascript-algorithms-and-data-structures/functional-programming/sort-an-array-alphabetically-using-the-sort-method/
function alphabeticalOrder(arr) {
return arr.sort(function(a,b) {
return a > b;
});
}