📜  数组排序 - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:05.007000             🧑  作者: Mango

代码示例6
/*
  Arrays Methods [Sort]
  - sort(Function [Opt])
  - reverse
*/

let myFriends = [10, "Sayed", "Mohamed", "90", 9000, 100, 20, "10", -20, -10];

console.log(myFriends);
console.log(myFriends.sort().reverse());