Commonly asked Javascript interview questions to remove duplicates from an array.Here are different ways to remove duplicates from an array and return only the unique values.1) Using SetES6 provides a new type named Set that stores a collection of unique values of any type. A set is a collection of items that are unique.var arr = [1, 2, 3, 4, 5, 3, 2, 1];//...