var newStr = ''; var arr = [111,1,111,2,33,3,44,5,33,44,6,77,77]; var Obj={}; for(i in arr){ Obj[arr[i]]=true; } var arrOut=[] for(key in Obj){ arrOut.push(key); } alert(arrOut)