¡@

Home 

2014/10/16 ¤W¤È 12:05:33

jquery Programming Glossary: multarr

jquery multidimensional array shuffle random

http://stackoverflow.com/questions/16617142/jquery-multidimensional-array-shuffle-random

myArrayE 21 22 23 24 25 fisherYates myArrayE To var multArr 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23.. 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 fisherYates multArr The output I want is like this 4 2 3 5 1 7 10 6 9 8 11 15 12.. i tempj myArray j myArray i tempj myArray j tempi var multArr 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23..

jquery multidimensional array shuffle random

http://stackoverflow.com/questions/16617142/jquery-multidimensional-array-shuffle-random

fisherYates myArrayC myArrayD 16 17 18 19 20 fisherYates myArrayD myArrayE 21 22 23 24 25 fisherYates myArrayE To var multArr 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 fisherYates multArr The output I want is like this 4 2.. 25 fisherYates myArrayE To var multArr 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 fisherYates multArr The output I want is like this 4 2 3 5 1 7 10 6 9 8 11 15 12 14 13 18 17 16 20 19 22 21 25 23 24 I tried this code http.. return false while i j Math.floor Math.random i 1 tempi myArray i tempj myArray j myArray i tempj myArray j tempi var multArr 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 fisherYates multArr But my code only randomizes the order..