Tell us what’s happening:
I think i used the right code, but it doesn’t seem to work. I logged the results to the console and nothing happens no matter if i store the result in a variable or change the sort method. Maybe there is an issue with the challenge?
Your code so far
function alphabeticalOrder(arr) {
// Add your code below this line
return arr.sort((a, b) => {
return a > b;
});
// Add your code above this line
}
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.109 Safari/537.36
.