Question: i'm stuck on how to do this programming challenge in javascript. If i could get the code that would help tremendously. Create a web page

i'm stuck on how to do this programming challenge in javascript. If i could get the code that would help tremendously.

Create a web page that uses JavaScript to generate a table with three rows and four columns. Each cell should be filled with a simple math problem. After a cell is created, two functions should be called to fill the cell:

One function should generate a random number between 1 and 20 (inclusive). This function should be called twice and it returns a number each time.

A second function should generate one of four operations at random, using a random number from 1 to 4 where 1=add,2=subtract,3=multiply, and 4=divide. The result should be returned to the main function.

Use the results of these three calls to fill each cell as follows:

cellContents = randomNumber1 + operation + randomNumber2; 

Save your page as math_ops.html and be sure to include an appropriate page title.

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!