js对象根据时间排序

list.sort((a,b)=> {
    return b.time < a.time ? -1:1

})

 

posted @ 2022-08-09 17:49  黑白棋学弟  阅读(276)  评论(0编辑  收藏  举报