const mixedUpNumbers = [10, 2, 400, 3, 7, 5, 8, 9, 1, 6];
const ascending = (a, b) => {
if (a < b) return -1;
if (a > b) return 1;
return 0;
};
const descending = (a, b) => {
if (a > b) return -1;
if (a < b) return 1;
return 0;
};
const sortedNumbers = mixedUpNumbers.slice().sort(descending);
console.log(sortedNumbers);
[ 400, 10, 9, 8, 7, 6, 5, 3, 2, 1 ]