Pastetool #444

URL: , Paste another

//	Javascript unique array
Array.prototype.unique = function () {
	var r = new Array();
	o:for(var i = 0, n = this.length; i < n; i++)
	{
		for(var x = 0, y = r.length; x < y; x++)
		{
			if(r[x]==this[i])
			{
				continue o;
			}
		}
		r[r.length] = this[i];
	}
	return r;
}

Download code

This javascript code was pasted on February 28, 2010




Protected with advance Anti-SPAM techniques :)
Coded and designed by Fedmich
Follow us on Twitter