var myArr = [1,3,4,5,6,3,7,4]; console.log(myArr.filter((value,index,arr)=>arr.indexOf(value)===index));