JS数组去重,用ES6的 new Set 方法很方便 let list = ['1','qq','bb','hh','qq'] const set = new Set(list) list = [...set] 这舒爽,谁用谁知道呢~