var myArr=[1,2,1,2,2,3,3,4,4,5,5,6,6];

function myRemove(){

	this.sort();
	for(i=0;i<this.length;i++){
		for(j=0;j<this.length-i;j++){
				if(this[j]==this[j+1]){
					this.splice(j+1,1);
				}
			
			}
		}
	return this;
	}
	
Array.prototype.myRemove=myRemove;
alert(myArr.myRemove());