https://leetcode.com/problems/final-value-of-variable-after-performing-operations/



Runtime: 125 ms, faster than 17.72% of TypeScript online submissions for Final Value of Variable After Performing Operations.

Memory Usage: 44.4 MB, less than 69.62% of TypeScript online submissions for Final Value of Variable After Performing Operations.



```typescript
function finalValueAfterOperations(operations: string[]): number {
    //9:00
    let value = 0
    for (const operation of operations) {
        if ((operation == "++X") || (operation == "X++")) {
            value += 1
        } else {
            value -= 1
        }
    }
    return value
    //9:01
};
```
