Posted By

blainejoubert on 02/17/09


Tagged

words remove duplicate in as3


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

MacEvelly


Remove Duplicate words in Array


 / Published in: ActionScript 3
 

  1. private function removeDuplicates (a:Array){
  2.  
  3. o:for(var i = 0, n = a.length; i < n; i++){
  4. for(var x = 0, y = r.length; x < y; x++) {
  5. if(r[x]==a[i]) continue o;
  6. }
  7. r[r.length] = a[i];
  8. }
  9. return r;
  10.  
  11. }

Report this snippet  

You need to login to post a comment.