This JavaScript script will look through an array and remove all duplicate array elements using loops and splice().
<script type="text/javascript">
var a=new Array('q','t','2','w','a','9','a','m','c','r','a','p','%','#','@','1','1','h','i','m','j','<','k','>','e','r','9','t','y','w','q');
for (j=0;j<a.length;j++) {
for (i=0;i<a.length;i++) {
if(a[i]==a[j] && j != i){a.splice(i,1);}}}
alert(a);
</script>