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

Remove duplicate values. A self-contained example using the JavaScript runtime.
Open this example in the interactive library
const values = [1, 2, 2, 3];
console.log([...new Set(values)]);
[ 1, 2, 3 ]