📜  javascript 对数组从小到大排序 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:50.327000             🧑  作者: Mango

代码示例4
var names = ["Peter", "Emma", "Jack", "Mia"];
var sorted = names.sort(); // ["Emma", "Jack", "Mia", "Peter"]