Javascript solution - 98% faster
\nvar removeOuterParentheses = function(S) {\n    let parenthesCount = 0;\n    let result = "";\n    \n    for (const letter of S) {\n        if (letter === "("
```\nvar removeOuterParentheses = function(S) {\n    let parenthesCount = 0;\n    let result = "";\n    \n    for (const letter of S) {\n        if (letter === "(") {\n            if (parenthesCount) {\n                result += letter;\n            }\n            parenthesCount++;\n        } else {\n            parenthesCount--;\n            if (parenthesCount) {\n                result += letter;\n            }\n        }\n    }\n    \n    return result;\n};\n```
['JavaScript']