数组内的对象按照2个属性进行排序
摘要:
数组内的对象按照2个属性进行排序(先按time从大到小排序,再按weight从大到小排序),请查看控制台看输出结果: var array = [{time: 1, weight: 4}, {time: 1, weight: 1}, {time: 1, weight: 9}, {time: 2, weight: 4}, {time: 2, weight: 1}, {t... 阅读全文
posted @ 2016-08-12 00:12 cag2050 阅读(573) 评论(0) 推荐(0) 编辑