JavaScript Stack Solution 60ms
\nvar removeDuplicates = function(S) {\n    let res = [];\n    for(let i=0; i<S.length; i++){\n        if(S[i] !== res[res.length-1]) {\n            res.push(S[
```\nvar removeDuplicates = function(S) {\n    let res = [];\n    for(let i=0; i<S.length; i++){\n        if(S[i] !== res[res.length-1]) {\n            res.push(S[i]);\n        } else {\n            res.pop();\n        }\n    }\n    return res.join("");\n};\n```
['Stack', 'JavaScript']