<table class="text">
<tr class="li1"><td class="ln"><pre class="de1">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 a = [1,1,2,3,5,2]; [ 1,2 ] > const _g = new Set(); undefined > a.map(i=>_g.add(i)); [ Set { 1,5 }, Set { 1,5 } ] > _g Set { 1,5 } > Array.from(_g); [ 1,5 ] > 原文链接:https://www.f2er.com/note/421840.html