ES6 Arrays

Filter uniq array values in ES6

[...new Set(myArray)];


myArray.filter((v, i, a) => a.indexOf(v) === i);

Posted on: Thursday 22 March 2018