how to find unique elements in array in javascript

JavaScript
let a = ["1", "1", "2", "3", "3", "1"];
let unique = a.filter((item, i, ar) => ar.indexOf(item) === i);
console.log(unique);
Source

Also in JavaScript: