in this activity, you will refactor a simple adding machine to create a siimple calculator that also subtracts, multiplies and divides two numbers based on a select
menu.
- Add a
select
menu to the form inindex.html
that has the following options:- Add
- value:
add
- value:
- Subtract
- value:
subtract
- value:
- Multiply
- value:
multiply
- value:
- Divide
- value:
divide
- value:
- Add
- Using conditional statements, perform the correct operation on the two numbers based on the menu option selected.
- Output the result to the page using an
output
element.