📅  最后修改于: 2022-03-11 15:01:07.938000             🧑  作者: Mango
function removeDuplicateCharacters(string) {
return string
.split('')
.filter(function(item, pos, self) {
return self.indexOf(item) == pos;
})
.join('');
}
console.log(removeDuplicateCharacters('baraban'));