<script>
var arr = [1, 2, 3, 3, 5, 7, 2, 6, 8];
var set = new Set(arr);
var newArr = Array.from(set);
console.log(newArr);
</script>
<script>
var arr = [1, 2, 3, 3, 5, 7, 2, 6, 8];
var set = new Set(arr);
var newArr = Array.from(set);
console.log(newArr);
</script>