Solution Review: Calculator
Solution to the exercise 'Calculator'.
We'll cover the following
The solution depends on first listing all the possible values the
operator can take:
operator === '<some operator>' to see if it is equal to any of the operators above. Create if conditions to cater to each condition for the respective operation. Finally, assign it to
The code below shows simple
else if conditions solve this problem.