Create an html document which does the following: 1. Generate an array of 100 integers with random number using the Math.random() method. 2. Display the contents of the array using comma ( , ) to separate the elements in a textarea. 3. Get the average of the 100 numbers then store its value. 4. Remove the top 10 largest numbers and the top 10 smallest numbers of the array. 5. Compute for the average of the new array. 6. Display the contents of the new array using comma to separate the elements in a textarea. 7. Compare the new average with average of the original array, show in an alert dialog box which average is larger?
Create an html document which does the following: 1. Generate an array of 100 integers with random number using the Math.random() method. 2. Display the contents of the array using comma ( , ) to separate the elements in a textarea. 3. Get the average of the 100 numbers then store its value. 4. Remove the top 10 largest numbers and the top 10 smallest numbers of the array. 5. Compute for the average of the new array. 6. Display the contents of the new array using comma to separate the elements in a textarea. 7. Compare the new average with average of the original array, show in an alert dialog box which average is larger?
Chapter8: Arrays
Section: Chapter Questions
Problem 9PE
Related questions
Question
100%
![Create an html document which does the following:
1. Generate an array of 100 integers with random number using the Math.random() method.
2. Display the contents of the array using comma (, ) to separate the elements in a textarea.
3. Get the average of the 100 numbers then store its value.
4. Remove the top 10 largest numbers and the top 10 smallest numbers of the array.
5. Compute for the average of the new array.
6. Display the contents of the new array using comma to separate the elements in a textarea.
7. Compare the new average with average of the original array, show in an alert dialog box which average is larger?](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F1931239c-3b9d-47bf-a348-8cd082e2a1f7%2F114fb04c-8c8a-4659-a66d-516758c82841%2F86kbu8_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Create an html document which does the following:
1. Generate an array of 100 integers with random number using the Math.random() method.
2. Display the contents of the array using comma (, ) to separate the elements in a textarea.
3. Get the average of the 100 numbers then store its value.
4. Remove the top 10 largest numbers and the top 10 smallest numbers of the array.
5. Compute for the average of the new array.
6. Display the contents of the new array using comma to separate the elements in a textarea.
7. Compare the new average with average of the original array, show in an alert dialog box which average is larger?
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage