[ascoders] mix function sort()
- From: "Andre Michelle" <am@xxxxxxxxxxxxxxxxxx>
- To: <ascoders@xxxxxxxxxxxxx>
- Date: Tue, 6 May 2003 10:29:17 +0200
hi,
wo gibt es mehr Informationen zur
manuellen Sor(tier)funktion für Array.sort();
Damit ich verstehe, warum das NICHT mein
Array zufällig "sortiert".
var mix = function ( a , b ) {
return ( Math.random() < .5 ) ? a : b;
}
var arr = [ 1 , 2 , 3 , 4 , 5 , 6 ];
arr.sort( mix );
Bei Array.sortOn kann man keine Sortierfunktion übergeben, oder doch -
anders ?
gruss
aM
http://www.andre-michelle.com
current:
http://tag-der-arbeit.extrajetzt.de
------------------------------------------------------
Archiv : http://www.freelists.org/archives/ascoders/
Optionen : http://www.freelists.org/list/ascoders
------------------------------------------------------
- Follow-Ups:
- [ascoders] Re: mix function sort()
- From: Michael Kneib
Other related posts:
- » [ascoders] mix function sort()
- » [ascoders] Re: mix function sort()
- » [ascoders] Re: mix function sort()
- » [ascoders] Re: mix function sort()
- » [ascoders] Re: mix function sort()
- [ascoders] Re: mix function sort()
- From: Michael Kneib