Tell us what’s happening:
the sort callback function isn’t working - i’m stuck… help please
Your code so far
function alphabeticalOrder(arr) {
var newArr = arr.sort(function(a, b) {
return a < b;
})
return newArr;
};
alphabeticalOrder(["a", "d", "c", "a", "z", "g"]);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36
.