var arr = [5,6,6,7,8];
var set = new Set(arr) // {5,6,7,8}
var newArr = Array.from(set) // 再把set转变成array
console.log(newArr) // [5,6,7,8]
var arr = [5,6,6,7,8];
var set = new Set(arr) // {5,6,7,8}
var newArr = Array.from(set) // 再把set转变成array
console.log(newArr) // [5,6,7,8]