codice:
Array.prototype.sortDesc = function() {
	function desc(a, b) {
		if (a<b) {
			return a<b;
		}
	}
	return this.sort(desc);
};

esempio:

codice:
array = new Array();
for (var i = 0; i<10; i++) {
	array.push(Math.floor(20*Math.random()));
}

array.sortDesc();
trace(array);