JS数组按两个元素排序

57 阅读1分钟

记录一哈

list.sort((a, b) => a.age - b.age|| a.id- b.id)