Tip: Randomize the contents of an Array

just wanted to share this, some months ago i was looking all over the web for an array content randomizer and found none, yesterday i was reading a book about AS3 and after finishing the arrays chapters tough of this:

function Random(target:Array):Array
{
	var tar1:Array = target;
	var tar2:Array = new Array();
	for(var i:int = 0; i < tar1.length; i++)
	{
		var selecter:int = Math.random() * 10;
		if(selecter >= 5)
                      {
                            tar2.push(tar1*);
                      }
		else
                      {
                            tar2.unshift(tar1*);
                      }
	}
	return tar2;
}

its a function that receives an array and return the received array scrambled, could be used like this

myArray = Random(myArray);

that would scramble the var myArray

(-: