var array = [5, 2, 3, 1, 4]; var result = array.sort() .reverse(); console.log(result); // [ 5, 4, 3, 2, 1 ]
確定! 回上一頁