Chainable Calculator

You are given a list of operations and a starting value. Each operation is a pair [op, value] where op is one of "add", "subtract", "multiply", or "divide". Start from the given value and apply each operation in order to the running total, then return the final number.

If the starting value is undefined or null, treat it as 0.

Examples
Input: [[],5]
Output: 5
Hints

Chainable Calculator

Apply an ordered list of arithmetic operations to a starting value and return the final number, handling each operation in sequence.