1.js编程题:一个数组arr=[{age:2,name:'xxx'},{age:5,name:'sss'},,{age:8,name:'www'}]要求按age排序,age相同则按name的字典序排序。data.sort((a,b)=> a.age===b.age? a.name<b.name?-1:1:a.age-b.age)2.js编程题:一个数组[{id:'1'},{id:'1-1',parentId:'1'},{id:'1-1-1',parentId:'1-1'}...]转化成[{id:'1',children[{id:'1-1',children:[{id:'1-1-1...