javascript solution [faster than 90%]
```/\n * @param {string[]} ops\n * @return {number}\n /\nvar calPoints = function(ops) {\n    let stack = [];\n    ops.forEach((op)=>{\n        if(parseInt(op))
```/**\n * @param {string[]} ops\n * @return {number}\n */\nvar calPoints = function(ops) {\n    let stack = [];\n    ops.forEach((op)=>{\n        if(parseInt(op)){\n            stack.push(parseInt(op))\n        }\n        else if(op === \'+\'){\n            stack.push((stack[stack.length-1] || 0 ) + (stack[stack.length-2] || 0 ))\n        }\n        else if(op === \'D\'){\n            stack.push((stack[stack.length-1] || 0 ) *2)\n        }\n        else if(op === \'C\'){\n            stack.pop();\n        }\n    })\n    console.log(stack)\n    return stack.reduce((a,v)=>a+v,0)\n};
['JavaScript']