Open this example in the interactive library
Source code
console.log([...new Set([...new Set([1, 2]), ...new Set([2, 3])])]);
Sample output
[ 1, 2, 3 ]

Open this example in the interactive library
console.log([...new Set([...new Set([1, 2]), ...new Set([2, 3])])]);
[ 1, 2, 3 ]