Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

More Books

Students also viewed these Databases questions

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago