Implementation of sort method

Report a typo

What type of sorted array will the output of this code snippet be?

let numbers = [5, 10, 30, 41, 100, 56];
numbers.sort((a,b) => {
    if(a > b) return 1;
    if(a < b) return -1;
    return 0;
});

console.log(numbers);
Select one option from the list
___

Create a free account to access the full topic