Return to Snippet

Revision: 49456
at July 22, 2011 03:28 by zackattack27


Updated Code
for (var i:uint = 0; i < myArray.length; i++)
{
    var rand:uint = int(Math.random() * myArray.length);
    myArray.push( myArray.splice( rand, 1 )[0] );
}

Revision: 49455
at July 22, 2011 03:27 by zackattack27


Initial Code
for (var i:uint = 0; i < myArray.length; i++)
		{
		   var rand:uint = int(Math.random() * myArray.length);
		   myArray.push( myArray.splice( rand, 1 )[0] );
		}

Initial URL

                                

Initial Description

                                

Initial Title
Randomize Array

Initial Tags
array

Initial Language
ActionScript 3