Question: Task: Let's build a program that is a calculator using JavaScript. The user inputs a number, an operator, and a second number and they will

Task: Let's build a program that is a calculator using JavaScript. The user inputs a number, an operator, and a second number and they will get the answer to the math problem.

1. Prompt the user to enter a number. Check to see if the input is a number. If not, end the program.

2. Prompt the user to enter an operator. Check to see if the input is an operator. If not, end the program.

3. Prompt the user to enter a second number. Check to see if the input is a number. If not, end the program.

4. Do the math (number1 operator number2) and output the answer.

5. If the user does not do something correctly, make sure you let them know what they did wrong.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!