1 let arr = [1,2,3,4,1,6,9,1,7,8]; 2 let arrnew = Array.from(new Set(arr)); 3 console.log( Math.min.apply(null,arrnew) );//1 4 console.log( Math.max.apply(null,arrnew) );//9