Posted By

adrianparr on 07/06/11


Tagged

element array remove indexof as3 splice


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

deers


AS3 Remove an element from an array


 / Published in: ActionScript 3
 

  1. var myArray:Array = new Array("a", "b", "c", "d", "e", "f");
  2. trace(myArray);
  3. myArray.splice(myArray.indexOf("c"), 1);
  4. trace(myArray);
  5.  
  6. // OUTPUT
  7. // a,b,c,d,e,f
  8. // a,b,d,e,f

Report this snippet  

You need to login to post a comment.