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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started