1.实现数组的去重: 1.1.方法一: let arr = [{id: 1, name: 'aa'}, {id: 2, name: 'bb'}, {id: 3, name: 'cc'}, {id: 4, name: 'dd'}, {id: 5, name: 'ee'}, {id: 1, name: 'aa'}, {id: 1, name: 'aa'}, {id: 1, name: 'aa'}, {id: 1, name: 'aa'}]; function unique(array) { cons…