Pregunta de entrevista de Q-Centrix

How do you write a function that removes duplicated elements in an array?