JavaScript -Array -Filter -Duplikate in React

const uniqueNames = names.filter((val,id,array) => array.indexOf(val) == id);
Disturbed Dolphin