Javascript code splits the string on ", "
then defines an anonymous function passed to filter, that takes three parameters representing the item, index and allitems. The anonymous function returns true if the index of this item is the same as the first index of that item found, otherwise false. Then join the elements of the Arrray on comma.
var str = "Z80.8, Z70.0, Z80.8";
var res = str.split(", ").filter(function(item,index,allItems){
return index == allItems.indexOf(item);
}).join(', ');
console.log(res);
Result:
Z80.8, Z70.0