Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
function unique() {
var seen = new Object;
var uniq = new Array;
for( var i = 0; i < this.length; i++ ) {
if( ! seen[ this[i] ] ) {
seen[ this[i] ] = true;
uniq[ uniq.length ] = this[i];
}
}
return uniq.sort();
}
Array.prototype.unique = unique;
var a = [ 1, 2, 2, 4, 5, 2, 2, 3, "a", "b", "a" ];
var b = a.unique();
for( var j = 0; j < b.length; j++ )
alert( j + ": " + b[j] );