# Array returning non-repeated numbers. How?

**URL:** <https://forum.kirupa.com/t/array-returning-non-repeated-numbers-how/201265>\
**Category:** flash\
**Created:** [September 19, 2006, 9:59pm UTC](https://forum.kirupa.com/t/array-returning-non-repeated-numbers-how/201265 "2006-09-19T21:59:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bontempos](https://avatars.discourse-cdn.com/v4/letter/b/f6c823/32.png) [@bontempos](https://forum.kirupa.com/u/bontempos)\
**Post date:** [September 19, 2006, 9:59pm UTC](https://forum.kirupa.com/t/array-returning-non-repeated-numbers-how/201265/1 "2006-09-19T21:59:35Z")

</div>

Hello there,

Simple. Take the array [4,6,6,7,8,8] for example.  
we have the number 6 and 8 twice.

Isn’t there a method to return this array like: [4,6,7,8] ?  
or, how can I push this number into the array only if they are not pushed yet?  
I tryed to make a loop with condition to check if the numbers was already there, but I had no bliss.

this is my code now:

```auto
meses = [];
        arquivos = xmlData.firstChild.childNodes[0];
        //populando array meses
        for (i=0; i<arquivos.childNodes.length; i++) {
            mes = mesNome(arquivos.childNodes*.attributes.mes);
            meses.push(mes); //<<<< here I think its the problem
        }

```

I think the code can’t help, but, there it is. This array “meses” (months, if you prefer), returns that example I told you about: [4,6,6,7,8,8], but I needed it with unique numbers.

Some advices please =)  
thanks a lot,  
Deh
