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'];