본문 바로가기

JavaScript

[JavaScript] Set 객체를 통해 배열 중복 제거

const array = new Set([1, 2, 3, 3, 2, 1]);
console.log(array) // {1, 2, 3}
반응형