In comp.lang.javascript message <5ea591dd-6cec-44cb-a0aa-ed62119c3c1b@v2
0g2000yqv.googlegroups.com>, Wed, 3 Mar 2010 14:42:53, Scott Sauyet
They've changed the algorithm. It's now correctly using the Fisher-
Yates Shuffle.
That one is in the source linked to from the FAQ.
But they do not need to shuffle an array preloaded with numbers; they
can with slightly simpler code generate the numbers while positioning
them - I call that Dealing.
But the script starts with making a 12-element array :
var dataBrowsers= new Array(new BrowserData ... // .
If they made arrays of 5 & 7 elements, they could be shuffled in place,
since exchanging object elements should be effectively swapping pointers
without moving the bulky data 'in' those objects. Then concat.
That Web page,
<
http://www.browserchoice.eu/BrowserChoice/browserchoice_en.htm>,
is one of the few cases where coding for IE-only might reasonably be
considered reasonable.
I winder why they have var ..., ArrayShuffle, ... at the start of
their page.js ?
Their code seems to have the idea that there are exactly 5 major
browsers, but that the number of minor ones is likely to vary - probably
sound enough in practice.
Query : all 12 browsers appear to be GUI. Given the state of EU and US
disability discrimination legislation, is it right for such a page and
its "further information" to have no apparent mention of Lynx and of
speech browsing?