Return to Snippet

Revision: 8761
at October 6, 2008 12:26 by Paco


Initial Code
function insertIntoArray( array:Array, itm, at:uint ):void
{
	var i:uint = 2
	var b:Array = array.slice( 0, at );
	var c:Array = array.slice( at );
	b.push( itm );
	a = b.concat(c);
}
//test
var a:Array = new Array( 0,1,2,3,5,6,7);

insertIntoArray( a, 4, 4 );
trace( a );

Initial URL

                                

Initial Description

                                

Initial Title
Array Function's

Initial Tags
array

Initial Language
ActionScript 3