var arr = [1,2,3,2,2,2,5,5,4,8,6,9,7] arr =new Set(arr)
console.log(arr)
<script type="text/javascript"> var arr = [1,2,3,2,2,2,5,5,4,8,6,9,7] arr =[...new Set(arr)] console.log(arr) </script>