JSで一意な要素のみを持つ配列を作る方法。
const array = [1, 3, 2, 5, 1, 2, 3]
const uniq = [...new Set(array)]
console.log(uniq) // [1, 3, 2, 5]JSで一意な要素のみを持つ配列を作る方法。
const array = [1, 3, 2, 5, 1, 2, 3]
const uniq = [...new Set(array)]
console.log(uniq) // [1, 3, 2, 5]