Posted By

mattkenefick on 05/19/08


Tagged

array duplicate an


Versions (?)

Array: Duplicate


 / Published in: ActionScript
 

  1. Array.prototype._duplicate = function() {
  2. /*
  3. * This returns a duplicate of the array
  4. */
  5. var newAry:Array = new Array();
  6. var ary_length = this.length;
  7. for (var i=0;i < ary_length; ++i){
  8. newAry.push( this[i] );
  9. }
  10.  
  11. return newAry;
  12. }// End Function

Report this snippet  

You need to login to post a comment.