Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Javascript
Ramdomize multiple arrays identically
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Tuxedo, post: 4962032"] Erwin Moller wrote: [...] Thanks for explaining this procedure. So for example, by creating the two arrays as well as the MyIndexes array for the randomization: ... var keys = new Array ("key1","key2","key3"); var values = new Array ("value1", "value2", "value3"); var MyIndexes = new Array(0,1,2) MyIndexes.sort(function() {return 0.5 - Math.random()}) .... how could I read out/rebuild the first two arrays based on the MyIndexes order, and thereafter return both, in for example a document.write() or alert() event? [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Javascript
Ramdomize multiple arrays identically
Top