Števo Bačkor's public notes

Javascript Array unique

April 03, 2019

Another note to myself. Filter Array’s unique values using vanilla Javascript like a boss

uniques = foo.filter(function(current, index, array) {
   return array.indexOf(current) == index;
});

Štefan Bačkor

Written by Štefan Bačkor who lives and works from Slovakia. You should check his Twitter or Github