var arr = [1,5,2,56,12,34,21,3,5] Math.min.apply({},arr) Math.max.apply({},arr) arr.sort((m,n)=>m-n) // [1, 2, 3, 5, 5, 12, 21, 34, 56] arr.sort((m,n)=>n-m) //[56, 34, 21, 12, 5, 5, 3, 2, 1] 去重复 var arr = [2,1,4,3,2,4,2,3,4,2,6,5,5] var obj = {}; va…