# Remove duplicates in Array?

**URL:** <https://forum.kirupa.com/t/remove-duplicates-in-array/276792>\
**Category:** flash\
**Created:** [December 3, 2008, 6:13pm UTC](https://forum.kirupa.com/t/remove-duplicates-in-array/276792 "2008-12-03T18:13:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhnh](https://avatars.discourse-cdn.com/v4/letter/b/eb8c5e/32.png) [@bhnh](https://forum.kirupa.com/u/bhnh)\
**Post date:** [December 3, 2008, 6:13pm UTC](https://forum.kirupa.com/t/remove-duplicates-in-array/276792/1 "2008-12-03T18:13:03Z")

</div>

Here’s an array…

ActionScript Code:  
[LEFT][COLOR=#000000] **var** [/COLOR] a:[COLOR=#0000ff]Array[/COLOR] = [COLOR=#000000] **new** [/COLOR] [COLOR=#0000ff]Array[/COLOR]COLOR=#000000[/COLOR];  
[/LEFT]

What I’d like to do is remove any duplicates from the array, so I get…

ActionScript Code:  
[LEFT][COLOR=#ff0000]“Alf”[/COLOR],[COLOR=#ff0000]“Bill”[/COLOR],[COLOR=#ff0000]“Cal”[/COLOR],[COLOR=#ff0000]“Dan”[/COLOR],[COLOR=#ff0000]“Ed”[/COLOR]  
[/LEFT]

I’m sure there’s an elementary solution, but I’m stuck. Any help would be greatly appreciated.
