//sort方法接收一个函数作为参数,这里嵌套一层函数用来接收对象属性名,其他部分代码与正常使用sort方法相同. var arr = [ {name:'zopp',age:0}, {name:'gpp',age:18}, {name:'yjj',age:8} ]; function compare Read More
posted @ 2020-07-15 09:03 秃头的铲屎官 Views(621) Comments(0) Diggs(0) Edit