var arr1=new Array('dsda','fjjd','fhhd','dsda','fhhd','dsda'); var arr2=[]; for(var i in arr1){ var key=true; for(var j in arr2){ if(arr2[j]==arr1[i]){key=false;break} } if(key)arr2.push(arr1[i]); } alert(arr2)