Call method: randomorder (array) <br/> the function returns a new array, which is the result of the random sorting of the array. <br/> example: </P> <p> program code <br/> var myarray: array = ["A", "B", "C ", "D"] <br/> myarray = randomorder (myarray) </P> <p> program code <br/> // random array sorting <br/> function randomorder (targetarray: array ): array <br/> {<br/> var arraylength: Number = targetarray. length <br/> // create an array in the normal sequence <br/> var temparray1: array = [] <br/> for (VAR I = 0; I <arraylength; I ++) <br/>{< br/> temparray1 [I] = I <br/>}< br/> // <br/> // create a random string based on the previous number of groups. out-of-order array <br/> var temparray2: array = [] <br/> for (VAR I = 0; I <arraylength; I ++) <br/>{< br/> // randomly extract elements from the normal sequence array <br/> temparray2 [I] = temparray1.splice (math. floor (math. random () * temparray1.length), 1) <br/>}< br/> // <br/> // create a temporary array. store the data obtained from targetarray based on the previous disordered array. <br/> VaR temparray3: array = [] <br/> for (VAR I = 0; I <arraylength; I ++) <br/>{< br/> temparray3 [I] = targetarray [temparray2 [I] <br/>}< br/> // <br/> // return the final result returned array <br/> return temparray3 <br/>}< br/>