Pergunta de entrevista da empresa New York Times

Create a function that accepts an array parameter with duplicate values and returns a new array without duplicates.