Question: Please help me with the external JavaScript code, thank you! Task 2. Edit task2.html and task2.js (1) Link your task2.js to your HTML code. (2)
Please help me with the external JavaScript code, thank you!
Task 2. Edit task2.html and task2.js (1) Link your task2.js to your HTML code. (2) Have the text in the paragraph mydata start with Result (see below). (2) Add four buttons to your Task2.html as shown below. (3) Write a function in JavaScript that has one parameter. When a button is pressed, it should pass the value shown in the button (e.g., 10, 20, 30, or 40) to a function named passNum. In your JavaScript code, your function should call a sub-algorithm that generates a random whole number between 1 and the passed value, inclusively. See example below for when the button that passes value 10 is pressed. random number between 1 and 10 is 6 10 20 30 40
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
