ES6数组去重

使用ES6的新语法对数组去重,相比ES5省去了排序再作双重For循环javascript (function() { 'use strict'; let arr = [1, '1', 2, '2', 3, '3', 3, '3', 2, '2', 1, '1']; let new_set = new Set(arr); let new_arr = Array.from(
相关文章
相关标签/搜索