let str=[ 1,2,3,4,5,1,2,,7,8] let str1=Array.from(new Set(str) ) // new Set 是實作數組去重、Array.from() 把去重後轉換為數組