Motive Interview Question

A question to filter out duplicates from an array using JS.