Write a JavaScript function to remove duplicate elements from an array.

Posted Date: