Metafic Interview Question

remove duplicates from an array solve using javaScript