Answered step by step
Verified Expert Solution
Link Copied!

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)

image text in transcribedPlease 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

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

DB2 11 The Ultimate Database For Cloud Analytics And Mobile

Authors: John Campbell, Chris Crone, Gareth Jones, Surekha Parekh, Jay Yothers

1st Edition

1583474013, 978-1583474013

More Books

Students also viewed these Databases questions

Question

=+8. Why is productivity important?

Answered: 1 week ago

Question

=+ 9. What is inflation and what causes it?

Answered: 1 week ago