Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 40Step 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