Q1:
-
This calculator takes values that could be written in a browsers route path as a single string. It then returns the result as a number (or an error message).
-
Route paths use the '/' symbol so this can't be in our calculator. Instead we are using the '$' symbol as our divide operator.
-
You will be passed a string of any length containing numbers and operators:
- '+' = add
- '-' = subtract