贫瘠小行星,种一颗玫瑰
1 const a = ['1', '2', '3']; 2 const b = [...a, '4', ...a]; 3 // 去重 4 const c = Array.from(new Set(b)); 5 console.log(c); // ['1', '2', '3', '4'];
posted on 2019-10-30 18:05 就让风继续吹吧 阅读(105) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2025 就让风继续吹吧 Powered by .NET 9.0 on Kubernetes