This snippet uses a combination of Set and Array.from() to filter out duplicate values and convert the result back into an array. When you initialize a Set with an array, it automatically removes any duplicate values.
Source code viewer
const uniqueArray = Array.from(new Set(yourArray));Programming Language: Javascript