Set()去重

 

const Arr = [3, 5, 1, 2, 7, 1, 3];
const unique = [...new Set(Arr)];

  

posted @ 2021-07-28 21:15  starstarnn  阅读(23)  评论(0)    收藏  举报