Simple JS solution with stacks
\nconst backspaceCompare = (S, T) => {\n    const strip = str => {\n        const stack = [];\n        for (const char of str) {\n            if (char === \'#\'
```\nconst backspaceCompare = (S, T) => {\n    const strip = str => {\n        const stack = [];\n        for (const char of str) {\n            if (char === \'#\') {\n                stack.length > 0 && stack.pop();\n            } else {\n                stack.push(char);\n            }\n        }\n        return stack.join(\'\');\n    }\n\n    return strip(S) === strip(T);\n};\n```
['JavaScript']