Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Javascript Define an empty array. Also create two functions: addNumber() reads a value from a text input field on the HTML document (id=num) and adds
Javascript
Define an empty array. Also create two functions: addNumber() reads a value from a text input field on the HTML document (id="num") and adds it at the end of the array. printInfo() outputs the amount of elements in the array to the console, then the average of their values. The HTML document has two buttons for calling the functions.
Example output:
The array has 10 elements.
The average of the values is 36.1
The output of the program must be exactly the same as the example output (the most strict comparison level)
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