MongoDB Interview Question

Write a function that removes all duplicates from an array