Hi there,

I have a simple question but can’t figure it out…

I was wondering how to create a new array from an existing array that would contain no duplicates…

I worked a bit on an example but it does not look very nice…

Any hint would be appreciated…

```
InputArray=newArray("Item1","Item2","Item3","Item1","Item2","Item4");
Array.show(InputArray);
waitForUser("Ready ?");
NbDuplicatedItems=0;
for (i=0; i<InputArray.length-1; i++){
for (n=i+1; n<InputArray.length; n++){
ItemI=InputArray[i];
ItemN=InputArray[n];
if(ItemI==ItemN && ItemI!=""){
InputArray[n]="";
NbDuplicatedItems++;
} // end of if
} // end of for n
} // end of for i
OutputArray1=InputArray;
Array.show(OutputArray1);
NbUniqueItems=InputArray.length - NbDuplicatedItems;
OutputArray2=newArray(NbUniqueItems)
n=0;
for (i=0; i<InputArray.length; i++){
ItemI=InputArray[i];
if(ItemI!=""){
OutputArray2[n]=ItemI;
n++;
}
}
Array.show(OutputArray2);
OutputArrayExpected=newArray("Item1","Item2","Item3","Item4");
Array.show(OutputArrayExpected);
```