3 ms·
The best link in the whole article is actually this one from the comments: http://sroucheray.org/blog/2009/11/array-sort-should-not-be-used-to-shuffle-an-array/
by fierarul 17y ago
The best link in the whole article is actually this one from the comments: http://sroucheray.org/blog/2009/11/array-sort-should-not-be-used-to-shuffle-an-array/ http://sroucheray.org/blog/2009/11/array-sort-should-not-be-... which discusses the javascript array sort.
- _delirium 17y agoedit: this comment was not correct, while parent and reply are; apologies for the confusion =] In an attempt to provide something non-incorrect, this is probably the simplest way in most imperative languages of doing a correct shuffle: http://en.wikipedia.org/wiki/Fisher–Yates_shuffle http://en.wikipedia.org/wiki/Fisher–Yates_shuffle
- mseebach 17y agoLook further. /resources/scripts/page.js, towards the bottom: function GenerateBrowserOrder()